Thread tagged as: Problem

Shared regions appearing as new regions on homepage


This is a regular occurrence, on a client site there's three text regions for social icons, as they appear on all pages we shared them.

Every so often they appear as new items on the homepage, resulting in the perch field to be blank (i.e. social url). Deleting the new regions and re-saving the shared items fixes it for the time being, but this has happened a few times now.

There are other regions (none shared) on the homepage which aren't affected.

Perch v2.7.4 (not the latest I know)

Many thanks

Michael Grinstead

Michael Grinstead 0 points

  • 6 years ago

What hosting company are you using?

I have this happen on one of my sites, but it is random and impossible to recreate, which makes it difficult to troubleshoot. This was the explanation I received of why this is occurring. It's not a fix, but it might help you troubleshoot it.

Ok. So this is what happens:

1) Perch requests all the content regions from the database, along with all shared regions

2) When a perch_content() function is called, it asks for a region. If it’s not in the list of existing or shared regions, a new region is created.

3) If there’s both a local region and a shared region in the database, the local region is used first

What can happen under load is that #1 above fails, so the list of regions is empty. Then when #2 happens, a duplicate is created in the database.

That’s why the problem doesn’t go away - the damage is done.

Hi Ryan, thanks for the reply.

The client is with EasySpace.

Thanks for the info. It seem it's only that one region, I may just end up turning it in to static content.

Michael, if static content is a possibility, then you should use perch:layout for the content. Otherwise you will end up having to go page by page should you need to change the content again. Have you tried perch layouts before? Anyways I hope this helps.

Thanks for the reply Robert, yes I was planning to use perch:layout.