hjl234
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Fixing WordPress
In reply to: Updating failed. The response is not a valid JSON response.Thanks @threadi – sorry not to have broken this down more clearly.
These are the steps I take:
- Copy this script into Clipboard directly from https://uk.bookshop.org/books/eating-to-extinction-the-world-s-rarest-foods-and-why-we-need-to-save-them/9781787331235?aid=5307: `<script
src=”https://uk.bookshop.org/widgets.js”
data-type=”book”
data-affiliate-id=”5307″
data-sku=”9781787331235″></script>` - In the Gutenberg editor from the end of my first paragraph, hit carriage return and am prompted to “Type / to choose a block”.
- Paste script.
- Use the dropdown in the right-hand box of the controls that pop up when hovering over that block (the one with the vertical ellipsis symbol).
- Select “Edit as HTML”.
- This converts the content of that block to: `<pre class=”wp-block-code”><code> <script
src=”https://uk.bookshop.org/widgets.js”
data-type=”book”
data-affiliate-id=”5307″
data-sku=”9781787331235″></script></code></pre>` - Select and delete that, and re-paste the original script above.
- Get an error: “This block contains unexpected or invalid content.”
- Open the dropdown accessed via the hortizontal ellipsis to the right of the “Attempt block recovery” button and select “Convert to HTML”.
- Toggle from “HTML” to “Preview” using the controls that pop up when hovering over that block and see the widget appearing correctly.
- Click “Update” in the top menu bar.
- Get the error: “Updating failed. The response is not a valid JSON response.”
Hope that helps and thanks for taking a look at this!
- This reply was modified 3 years, 10 months ago by hjl234.
- Copy this script into Clipboard directly from https://uk.bookshop.org/books/eating-to-extinction-the-world-s-rarest-foods-and-why-we-need-to-save-them/9781787331235?aid=5307: `<script
Viewing 1 replies (of 1 total)