Is your GlobalArea not showing up publicly?

Permalink 1 user found helpful
Howdy. Not really a question, but wanted to document an issue / solution I came across.

If you have GlobalAreas showing up for logged-in users, but not publicly:
1. While logged in, go to a page w/ the GlobalArea on it.
2. Click the left-hand gear logo.
3. Go to versions.
4. On the latest version, click the arrow in the upper right hand corner.
5. Click approve.

Went down the Stack -> Collection rabbit hole to Collection->getBlockIds to figure that one out.

Hope I saved someone some time.

meandmybadself
 
dclmedia replied on at Permalink Reply
dclmedia
Hi
I am having the same problem. I am using c5.7.4 to develop a new site and didnt have this problem in previous versions. What version are you using?

Simon.
meandmybadself replied on at Permalink Reply
meandmybadself
5.7.3.1
meandmybadself replied on at Permalink Reply
meandmybadself
I think the premise behind the solution was to force a version update to the GlobalArea anywhere in the editing environment & publish it.
dclmedia replied on at Permalink Reply
dclmedia
The problem I seem to be having is that the content that I enter in the GlobalArea isn't saving. I have three GlobalArea 's defined in a header and none of them are working. The code is the standard setup
<?php  
$a = new GlobalArea('Logo'); 
$a->display($c);    
?>


It is a real head scratcher! :-(
meandmybadself replied on at Permalink Reply
meandmybadself
A couple of potential ideas to help:

- Try getting rid of $c in your display reference. It's redundant.
- Make sure they all have unique area names.
- Check the database to see if your stuff is being persisted, but not shown?
dclmedia replied on at Permalink Reply
dclmedia
Getting rid of the $c hasnt made any difference.

Do you know off the top of your head which table I need to look at? My brain hurts and it would save me searching though them...

Thanks

:-)
meandmybadself replied on at Permalink Reply
meandmybadself
It would be stored in the related Block type table.
dclmedia replied on at Permalink Reply
dclmedia
I have traced it through the tables and it would appear to have all the necessary references in the tables.
meandmybadself replied on at Permalink Reply
meandmybadself
Make an edit to the Global Area (add a space / take a space), then check your versions to make sure you're at the latest. I've screen-capped it for you.
https://dl.dropboxusercontent.com/u/531386/versions.gif...
dclmedia replied on at Permalink Reply
dclmedia
Yep, I have checked and it is creating the new version but not retaining the global area. I am getting the same on all GlobalArea's, but the regular page specific area's are absolutely fine.

Thanks for the visual :-)
meandmybadself replied on at Permalink Reply
meandmybadself
Can you trace out the value of $blockIDs at
Concrete\Core\Page\Collection\Collection:792
dclmedia replied on at Permalink Reply
dclmedia
I'll be honest with you, you're kinda losing me there a bit. I can trace the bID in the Blocks table and then using myPHPadmin I can follow through where this bID is used.

It would appear to be referencing through the collection of tables correctly (when I cross-reference it in the 'CollectionVersionBlocks' table it is giving the correct arHandle for the GlobalArea)

I dont know if this tells you anything or not
meandmybadself replied on at Permalink Reply
meandmybadself
Not really. I just worked my way down the rabbit's hole until I found that the getBlockIDs wasn't returning anything. If you wanna hop into the IRC channel, we can help iterate a little quicker on your issue.
dclmedia replied on at Permalink Reply
dclmedia
Hey meandmybadself

I have resolved the issue. Some some bizarre reason I was getting a conflict with the naming of the block. I changed the name of the GlobalArea block and hey presto!

Thanks for all of your advice, It is really appreciated!

Best wishes

Simon.