CMS attributes causing duplicated blog posts only on live domain

Hello!

I’m reaching out because my blog list is displaying duplicated blog posts on our live domain, however, its not duplicating on our staging domain.

When I disable cmssort this problem is fixed, however i need to keep cms sort functionality.

Im using 4 attribute solutions on the page: cmssort, cmsfilter, cmsload & cmsselect

I know this seems like a domain/dns setup issue, however i’ve reached out to our devs and they reported that the pages were ‘identical’.

I’m really not sure where to go from here, If anyone could give me any pointers or debugging help that would be amazing.

Thanks in advance!

Hey @mattspieg!

I’ve been trying to replicate the issue on my end but have not succeeded in having the repeated items.

This normally occurs when CMS Load is initiated twice, either by having the script duplicated on the page or by a third-party script interfering with the load of this script.

I do not see a repeated script. Would any of your custom code interfere with our script?

If we can’t find a solution, we are very very close to releasing Attributes V2. A migration to the newer version could solve this.

Hi @Support-Luis thanks for taking a look! Do you see the duplicated blog posts on this domain: Web3 Security Insights: Smart Contract Audits | Cantina Blog

I have experienced inconsistency with them duplicating today, so maybe it’s not reproducible 100% of the time.

let me know if i can provide any other code snippets to help debug.

Hey @mattspieg! Yes, I can see the duplicate items on the page now.

Could you point me to any custom script for this page? Or could you try recreating this setup on a new test page?

I’ve found really rare cases where there is nothing wrong set-up wise, and re-building the page solves this kind of issue.

Hi @Support-Luis thanks once again for taking a look.

I have fixed the problem for now. I thought i’d share further debugging and my workaround here if anyone else experiences the same problem.

I noticed the bug only occurs when cmsload and cmssort exist on the page at the same time. If one was turned off the bug doesn’t occur.

I fixed the problem by increasing my page load pagination from 24 to 100.


Maybe this reduces the amount of requests to get the data or something. Not 100% sure why it works. And i’m not sure if it will be a lasting solution. However, if this bug occurs again when i have 100+ posts, i might have to migrate to attributes v2.

Thanks once again for your help!

@mattspieg

However, if this bug occurs again when i have 100+ posts, i might have to migrate to attributes v2.

Very possible, since the list is less than 100 items, CMS Load set to render-all basically does nothing on the page :thinking:

The weird thing is that CMS Load and CMS Sort have been used in the same list in a lot of other projects, and normally this is not an issue.. but well :man_shrugging: happy that your particular setup is working now.

Let me know if you face any other issue!