Page content has duplicated itself on the frontend

I’m scratching my head over a page that has its contents duplicated on the frontend, in the builder the page is fine. The only thing that changed was the addition of a component, but even if I remove the component the problem persists. I’ve been looking into this for a good bit now and I’m not seeing anything obvious here.

Could you please take a look to see what is causing this? Details are in a secure note.

Many thanks in advance!

Hello @JvP,

Thanks for writing to us.

It appears that the provided login credentials do not currently have Administrator privileges, so I am unable to access the Pages section of the WordPress dashboard. Could you please grant Administrator access to the shared user account so that we can investigate the issue on our end?

Thanks

The user does have Administrator level access but mandatory 2FA setup was enabled for admins. I have temporarily disabled that now so you should be able to get in properly now. Let me know if that’s not the case.

Hello @JvP,

I checked on my end, but it seems that the page is rendering fine on my end I can not see the duplicate content on my end. Please clear your browser cache and check it again.

Thanks

Ok, odd.

I’ve checked it in multiple browsers, private browsing as well, and the page content is duplicated. The client also sees it.

Local data cleared, object cache cleared. Local and server side caching disabled.

Could it have something to do with the looper(s) and/or consumer(s) on the slider component on the page?

Hey @JvP,

Yes, I can confirm that it is the Looper/Consumer you have enabled in the Row element on your page. It is no longer needed since you already have it in your Component.

Best Regards.

That’s not entirely correct. The exported component does not include its own looper provider. I’ve put the looper provider on the row, which is not part of the export. It should work like that, right? What do I need to change for this to work properly?

Hello @JvP,

Kindly check out the copy page I have created. I separated the Looper Provider Dynamic Content {{dc:acf:post_field field=“season-overview-meals”}} from the Looper Consumer:

Slider (Season Overview)
   Content Wrapper
       Slider Container [Looper Provider Dynamic Content {{dc:acf:post_field field="season-overview-meals"}}]
            Slide [Looper Consumer]
                 Meal Dates
                  Product Card

image

Check out the page URL in the secure note below.

Thanks.

Alright, I’ve copied your setup but that hasn’t fixed the problem unfortunately. The page content is still duplicated.

Hey JVP,

It looks like this issue is related to our Under Construction plugin. I deactivate and reactivated and it looks like the issue is gone. But, that might be because there is cache. Can you confirm?

If that doesn’t fix the issue, please try switching to the Page Template to Blank - No Container | No Header, No Footer.

If that won’t work still, please copy your site to a staging server and provide the staging URL and we’ll continue investigating.

Thanks.

1 Like

Indeed, the Under Construction plugin seems to be causing this issue. I disabled it and the page rendered normally and with it reactivated the page has duplicate content again.

Do you know why this is? Could a fix be implemented for this in the Under Construction plugin?

Thanks for looking into it guys!

Hey @JvP,

Thank you for your patience while we investigated this. We have identified the cause: when Under Construction serves a custom page to logged-out visitors, it replaces WordPress’s page query in a way that conflicts with query-based Loopers. When a Looper on the page finishes, it resets WordPress back to its original query, and the page is rendered a second time. Logged-in and bypassed visitors are not affected, which is why the page looked correct when we viewed it while logged in. We have reported this to our developers so it can be fixed in the plugin.

  1. Use the built-in Under Construction screen for now – In Pro > Under Construction, uncheck “Use a custom Under Construction Page” and save. The standard screen does not replace the page query, so it avoids this issue. Please purge any server cache and check the site in a private window.

  2. Or use a simpler Coming Soon page – If you prefer to keep a custom page, select a separate page that does not use query-based Loopers (Recent Posts, Query Builder, Query String, Current Post, Archive or Shop). Your current home page includes such a Looper, which triggers the duplication.

  3. Keep your current build unchanged – Your home page and its components do not need to change. Once the plugin is updated and the site goes live, the page will render normally.

Best Regards.

Fantastic, looking forward to the fix then. And thanks again for diving into it.

And just for my understanding, the original looper and consumer setup can be restored once the fix is released?

Hello @JvP,

Yes, that’s correct. Once the plugin fix is released, you can restore your original Looper and Consumer setup, and it should work normally without duplication.

Thanks for understanding

Fix is released in Under Construction 2.2.1. Have a great day.

Thanks Charlie!

I wish you a great day as well, and thanks again for identifying and fixing the issue.

1 Like

You are most welcome, @JvP

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.