Load Error! (parse error) Loading Sitemap
anyone seen this on a 5.7.4 install?
I upgraded a 5.7.4 rc1 instance to 5.7.4 and wherever the sitemap is supposed to show instead of the sitemap rendering I get a red exclamation mark and the above message.
I just tried a fresh install with another download of 5.7.4 and I get the same. I'm guessing it is environment related.
Anyone seen this before, can point me in the right direction and save me some time?
The bug was quickly fixed by mlocati.
You can apply the fix by replacing these two files:
Instead of applying this fix to an older version of concrete5, I recommended updating to the current version which includes the fix (along with many other fixes and improvements).
Can you trace the error back to a certain event or narrow down the time frame?
What actions have you performed over the last week? Did you change themes, modify a theme, install a package, etc.?
(C5 v22.214.171.124 and C5 v5.7.5)
It turns out that though tedious back-tracing and un-installing I narrowed it down to the add-on responsible for my troubles. If you happen to have the add-on named "ACCESSIBILITY PER USER" (See image attached) then you have to make sure to UNINSTALL IT and check the remove it from (whatever) option. Clear the cache and it should work. Hope that helps.
All the best!
It works and adds the script to the head but it also causes the Sitemap error. If I take out the addHeaderItem, the Sitemap works again.
So, I can stop the error but can't get my package to work properly then. I'm guessing there is another way to add a header item to a package that won't cause sitemap issues but I'm not aware of it. Anyone out there know a way around this?
I believe addHeaderItem() in your package on_start() adds items to all pages - theme pages and concrete5 dashboard pages. Your Google API script is being added everywhere, which I don't believe you are looking to do.
Where are you trying to load this script?
If you are looking to load this within a block, it could be done using $this->addHeaderItem() in view(), edit(), and add(), depending on what you are trying to accomplish.
If you are looking to load this within a single page/dashboard single page, it can be done using $this->addHeaderItem() in a controller method like view() or methods you have created.
I wasn't aware of the registerViewAssets() function that could be used for things like this.