Post Content block returning empty only on specific page

Description:

This is a strange one!

We have a synced pattern (formerly known as reusable block) containing a modal, containing a query containing a post content block. We are using this on multiple pages. On the home page it works perfectly, on the “courses” page, the page content block returns empty only for the first post in the query.

Step-by-step reproduction instructions:

Please write the steps needed to reproduce the bug.

At this stage I am not sure this can be reproduced easily, here is the best I can do:

  1. Add a Modal block (with a trigger)
  2. Add a Query block with a Query Template to the Modal
  3. Add a Post Content block in the Query Template
  4. Convert this to a Synced Pattern
  5. Add it to multiple pages (e.g. Home, Courses, etc)
  6. Notice that the Post Content is blank (i.e. not returned) for the first post only on the courses page only

Environment info

  • WordPress version: 6.3
  • Cwicly Plugin version: 1.2.9.9.5

@Araminta @Louis, just checking about this as it is on a soon to be live site and we need to find a solution to it.

If you need any clarification, please let me know.

Probably not related, but a change was made in WP 6.3 with the core Post Content block such that it is only visible in the Gutenberg editor in the Site Editor. It used to be accessible in the regular content editor also.

Hi @StrangeTech,

Sorry for not responding sooner!

Unfortunately, I haven’t been able to reproduce this error on my end.

To investigate this further, I have set up a demo instance.
Please log in with this, and see the test reusable block/synced pattern, as well as the page 1 and 2.

Feel free to play around with this, as I’m unsure whether I have set up the necessary in order to reproduce the issue.

Thank you in advance.

Thanks @Araminta, I will do this as soon as there is an opportunity.

@Araminta, just confirming this issue is still present with 1.3.0.1 for that specific website. We will investigate the cause in more detail over the coming week when we do some maintenance for the website.

1 Like

Just confirming this issue is still present with 1.3.0.3.

Hi,

We appreciate the issue is still present on your installation but will need more information to make sure the issue lies with Cwicly.
Would you be so kind as to give more info on what the “courses” page refers to exactly?

While it may not be the case, it’s important to remember that you cannot render a Post Content block within a Post Content block if it’s the same ID you’re querying.
This would be the case if your “courses” page is rendering a Post Content block which in turn contains a Post Content block of the same content (loop) because of the Query block.

Best regards,
Johnny

So, the query we are doing is a completely separate one. It shows a list of trainers/coaches. It displays completely fine on the home page but exhibits the strange behaviour on the other page (“courses” page).

As the site is in soft launch and publicly available I will provide the details for the Cwicly team.

@Louis, this is still occurring for us, if you are able to take a quick look at this we will really appreciate it.

Confirming that this was caused by having LearnDash installed and displaying the query on the LearnDash course archive page while having no courses created yet.

Simply adding a course to LearnDash immediately resolved the issue.

Thank you @Louis for looking into this. This can be marked as done.

1 Like

Hi @StrangeTech,

Thank you for confirming this!
Glad to hear it’s now resolved on your end.

Moving to General.