• Resolved colortones

    (@colortones)


    We recently noticed the Content Display block not showing up on a page and upon further investigation noticed that between revisions of a page edit, block attributes had changed. Specifically:

    older revision of the block on the page:

    <!-- wp:advgb/recent-posts {"postView":"list","category":"84717","numberOfPosts":100,"columns":1,"displayFeaturedImage":false,"displayAuthor":true,"displayDate":true,"postTextAsExcerpt":true,"postTextExcerptLength":300,"myToken":819,"readMoreLbl":"Read Blog","changed":true} /-->

    newest page revision:

    <!-- wp:advgb/recent-posts {"postView":"list","categories":[{"id":"84717","name":"Press Releases"}],"numberOfPosts":100,"columns":1,"displayFeaturedImage":false,"displayAuthor":true,"postDate":"created","postTextAsExcerpt":true,"postTextExcerptLength":300,"myToken":819,"readMoreLbl":"Read Blog","changed":true,"category":""} /-->

    We’re using a Gatsby front-end and our component that parses the data from the block is expecting to see a value for category and it looks like the attribute layout has changed, and now there is a separate array that contains id and name instead.

    Trying to figure out how it got changed – as we haven’t updated the plugin. ˉ\_(ツ)_/ˉ

    • This topic was modified 2 years, 11 months ago by colortones.
    • This topic was modified 2 years, 11 months ago by colortones.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author htmgarcia

    (@htmgarcia)

    Hi @colortones,
    which version of the plugin are you using?

    Thread Starter colortones

    (@colortones)

    Sorry – should have included that. We’re using Version 2.10.3. and WP Version 5.6.2

    • This reply was modified 2 years, 11 months ago by colortones.
    Plugin Author Steve Burge

    (@stevejburge)

    Hi @colortones

    Both of those versions are considerably out-of-date. Can you confirm the issue with the latest version of our plugin and WordPress?

    Thread Starter colortones

    (@colortones)

    I figured out what is happening. In the previous version of plugin we had, v2.4.6 the Recent Posts block generated code for a specific category like this:

    {"postView":"list","category":"84717"}

    and in the version we updated to back in late September of 2021 v.2.10.3 the block generated this code for a specific category:

    {"postView":"list","categories":[{"id":"84717","name":"Press Releases"}]}

    We hadn’t updated the page that this block appeared on until April 5th of this year, when the new attribute structure got rendered and Gatsby didn’t know what to do with it.

    We’ll update the plugin and the Gatsby component to parse the newer format.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Content Display block not displaying’ is closed to new replies.