Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter hjl234

    (@sequencefree)

    Thanks @threadi – sorry not to have broken this down more clearly.

    These are the steps I take:

    1. 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&#8221;
      data-type=”book”
      data-affiliate-id=”5307″
      data-sku=”9781787331235″></script>`
    2. In the Gutenberg editor from the end of my first paragraph, hit carriage return and am prompted to “Type / to choose a block”.
    3. Paste script.
    4. 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).
    5. Select “Edit as HTML”.
    6. This converts the content of that block to: `<pre class=”wp-block-code”><code> <script
      src=”https://uk.bookshop.org/widgets.js&#8221;
      data-type=”book”
      data-affiliate-id=”5307″
      data-sku=”9781787331235″></script></code></pre>`
    7. Select and delete that, and re-paste the original script above.
    8. Get an error: “This block contains unexpected or invalid content.”
    9. Open the dropdown accessed via the hortizontal ellipsis to the right of the “Attempt block recovery” button and select “Convert to HTML”.
    10. Toggle from “HTML” to “Preview” using the controls that pop up when hovering over that block and see the widget appearing correctly.
    11. Click “Update” in the top menu bar.
    12. 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.
Viewing 1 replies (of 1 total)