Error adding global Areas

Permalink
Hello,
I'm in big trouble with Global Areas in my site, I'm not able to add new Global Areas. I use
this simple code
<?php $a = new GlobalArea('MenuLateral'); $a->display(); ?>


but when I try to add a new block I don't get the list of available blocks. Nothing happens but a jquery error 500 from
/index.php/tools/required/edit_area_popup.php?cID=10492&arHandle=MenuLateral&atask=add&addOnly=0

The error message tells me (in spanish) something like "It's not possible to get the auth key to add_blocks" (No es posible obtener la clave de autorización para add_blocks)

I tried with different names, but nothing happens. If I create an Area, it works fine but when I turn it into a global area I get the same problem.
I don`t know what to try and it's urgent for me to fix it. I would appreciate any help,
Thank you very much

 
hutman replied on at Permalink Reply
hutman
Does this happen both on the front end and in the Dashboard?
dicoruna replied on at Permalink Reply
It happens on the front end when I am in edit mode and I try to add new block or paste from clipboard clicking on the global area. I don't know how to do from the dashboard, maybe I don't understand your question. Thank you for your interest.
hutman replied on at Permalink Reply
hutman
If you are using 5.7:

Click the menu icon from the front end
Click Stacks & Blocks
This will bring you to a page showing all your Stacks, in the upper right of the screen there will be a dropdown that says View Stacks, click it and select View Global Areas
This should give you a list of Global Areas that you can edit just like you would on the front end, but hopefully without the error.

If you are using 5.6

Click the Dashboard button
Click Stacks
This page should list all your Global Areas that you can edit just like you would on the front end, but hopefully without the error.
dicoruna replied on at Permalink Reply
I'm using 5.6 but my global area doesn't appear in the dashboard list even if I can see it in the php code and in the page when in edit mode.
Maybe is unrelated but I'm getting errors like this lately:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 523800 bytes) in /export/nfs1/apache/www/webc5/concrete/core/libraries/cache_local.php on line 22

not only in cache_local, autonav.php too ...

Thank you again for your help, I'll keep on working on it.
hutman replied on at Permalink Reply
hutman
This is just an educated guess, but if your Global Area isn't in the Stacks list, I bet you are getting errors trying to add to it, because it doesn't "exist" in the CMS.
dicoruna replied on at Permalink Reply
The Areas I created, they appear in the sitemap system pages inside "stacks" but the I still can't edit them.

Yesterday, I delete all rows from pilecontents table trying to clean the clipboard.
It may be the cause of everything ... I am waiting now for the backup recovery so I can restore it and if the problem is gone.

Thank you again
dicoruna replied on at Permalink Reply
I have figured out a way to get it working. I can create a new GlobalArea by duplicating an existing one on the Dashboard inside "Stacks". After doing that and renaming it to the name of my new GlobalArea, I can use it like always did.
The problem seems to be in the "add_blocks" permissions checked in this lines from
/concrete/core/models/permissions.php:
$pk = PermissionKey::getByHandle($permission);
$r = call_user_func_array(array($pk, $f), $a);


but I didn't change any permissions. I'm a bit worried but, at least, I can go on with my work while I try to fix it.
Thank you for your help.