Fatal Error in new layout tool
Permalink
When I click the + button to edit the layout I get this
Fatal error: Call to a member function getAreaHandle() on a non-object in /var/www/vhosts/touch-akl.com/subdomains/dev/httpdocs/broadway/concrete/tools/edit_area_popup.php on line 27
Help! it was all going so nicely, I have just upgraded to 5.4.0.5
Nige
Fatal error: Call to a member function getAreaHandle() on a non-object in /var/www/vhosts/touch-akl.com/subdomains/dev/httpdocs/broadway/concrete/tools/edit_area_popup.php on line 27
Help! it was all going so nicely, I have just upgraded to 5.4.0.5
Nige
does the area handle have a space or other weird characters in it? that's a known issue that should be resolved in the next point release. otherwise not too sure what's happening.
Thanks for replying Tony.
Well it's a pretty standard layout to me. By space what do you mean?
Ive attached a screen grab. Good to know there's a known issue. It must be it.
Nige
Well it's a pretty standard layout to me. By space what do you mean?
Ive attached a screen grab. Good to know there's a known issue. It must be it.
Nige
Its giving this error without anything in the layout at all.
I just create a new layout and then try to edit it.
Gives the error.
Perhaps its not this known issue...
I just create a new layout and then try to edit it.
Gives the error.
Perhaps its not this known issue...
yeah, I think it doesn't like that under_score in the area that you've named "Projects_home". Try renaming that area to ProjectsHome, and see if that works.
The issue may be realated to the "CamelCase" issue discussed here:
http://www.concrete5.org/community/forums/customizing_c5/cache-prob...
Thanks go to andrew!
http://www.concrete5.org/community/forums/customizing_c5/error-when...
http://www.concrete5.org/community/forums/customizing_c5/cache-prob...
Thanks go to andrew!
http://www.concrete5.org/community/forums/customizing_c5/error-when...
OK I renamed that area and it hasn't made any difference.
Not sure I really understand this Camel Case thing.
If we could just have a 'safe' way of naming areas and blocks that would be good. Do I need to change the name of the div as well, it has underscores and hyphens eg side-b_proj_home
Not sure I really understand this Camel Case thing.
If we could just have a 'safe' way of naming areas and blocks that would be good. Do I need to change the name of the div as well, it has underscores and hyphens eg side-b_proj_home
Now that I look a little closer at the error, it is probably not related to the "CamelCase class object missing/not found" issue. Sorry about that.
Well Ive renamed the div (as it was a bit messy) but when I rename the area handle all the blocks disappear.
I will try and re-build the layout after it has disappeared, with new names for the div and the area handle.
If that doesn't work it may well be something else.
Thanks for your help.
I will try and re-build the layout after it has disappeared, with new names for the div and the area handle.
If that doesn't work it may well be something else.
Thanks for your help.
Tony, has this been fixed in the bleeding edge directory (trunk/web) of the SVN repository? It doesn't appear to be, but I want to make sure I'm not doing something stupid.
-Steve
-Steve
Andrew & I went back and forth on this issue for a while. to get it to work with any character, it would have required changing the way a lot of different strings were encoded. Andrew was concerned would create some other issues elsewhere and decided against it. As a result ampersands in area names aren't supported, and perhaps some other non-alphanumberic character types, but area names should support normal characters and spaces.
I've also encountered this error.
If it's any help, my layouts were fine until I did the following things:
1) created the layout using two columns
2) adjusted the slider, inputted some content and an image block into each column
3) saved the page
4) put the page back in edit mode, and then copied it under the same parent page four different times (I expected it would carry the layout and containing blocks with it)
5) saw that it didn't carry the layout and blocks with it, and then tried to create the layout again
6) created the layout, tried to edit it—recieved the error.
At one point, when trying to get rid of the uneditable layout , I tried to delete it straight out and got an "Access Denied".
Eventually I did get it deleted however (sorry—forget how, I may have just navigated away from the page and come back to it).
FYI: just toyed with it a bit more. Wow! I went to one of the copied pages and put in a layout. It automatically re-created the blocks from the page it was copied from—including another block that wasn't part of that same layout.
Maybe all this has something to do with copying pages?
Edit: the layout on the parent page of this shenanigan also throws the error when I try to edit it.
If it's any help, my layouts were fine until I did the following things:
1) created the layout using two columns
2) adjusted the slider, inputted some content and an image block into each column
3) saved the page
4) put the page back in edit mode, and then copied it under the same parent page four different times (I expected it would carry the layout and containing blocks with it)
5) saw that it didn't carry the layout and blocks with it, and then tried to create the layout again
6) created the layout, tried to edit it—recieved the error.
At one point, when trying to get rid of the uneditable layout , I tried to delete it straight out and got an "Access Denied".
Eventually I did get it deleted however (sorry—forget how, I may have just navigated away from the page and come back to it).
FYI: just toyed with it a bit more. Wow! I went to one of the copied pages and put in a layout. It automatically re-created the blocks from the page it was copied from—including another block that wasn't part of that same layout.
Maybe all this has something to do with copying pages?
Edit: the layout on the parent page of this shenanigan also throws the error when I try to edit it.
Yes I'm having a lot of the same issues with the layout tool.
I have changed my div names and removed any bad non alphanumeric characters but it hasn't fixed it.
Also like the post above it does do odd things.
For instance. It tried to change the $a = new Area('ProjectsHome Body'); to another name and the entire layout disappeared. I put the name back and it all returned.
I haven't been able to edit any of the layouts with the layout tool so far, it always returns the fatal error.
I love the new tool, it works intuitively and in a very design oriented way but its got a few issues.
Nige
I have changed my div names and removed any bad non alphanumeric characters but it hasn't fixed it.
Also like the post above it does do odd things.
For instance. It tried to change the $a = new Area('ProjectsHome Body'); to another name and the entire layout disappeared. I put the name back and it all returned.
I haven't been able to edit any of the layouts with the layout tool so far, it always returns the fatal error.
I love the new tool, it works intuitively and in a very design oriented way but its got a few issues.
Nige
As a quick temporary fix, try the following...
1. Copy "edit_area_popup.php" from the "concrete/tools" directory into the root "/tools" directory.
2. In the copy, change the line near the top which reads...
$a = Area::get($c,$_GET['arHandle']);
...to...
$a = Area::get($c, urldecode($_GET['arHandle']));
It should work until an official C5 fix is out.
-Steve
1. Copy "edit_area_popup.php" from the "concrete/tools" directory into the root "/tools" directory.
2. In the copy, change the line near the top which reads...
$a = Area::get($c,$_GET['arHandle']);
...to...
$a = Area::get($c, urldecode($_GET['arHandle']));
It should work until an official C5 fix is out.
-Steve
Great thanks Steve I will give it a go...
yeah, if you change your area name, it's going to make all of the blocks that point to the old area name not show up. that's unrelated to the layout tool.
Cheers Tony, yeah I kind of gathered that, but I thought the div name was the important one (handle) and the area name $a = new Area('ProjectsHome Body'); was just like a user name.
In this case both the div name and the area name have no funny characters but ti still generates the error.
Nige
In this case both the div name and the area name have no funny characters but ti still generates the error.
Nige
the div id shouldn't have anything to do with how areas or layouts operate.
Right. So the area name is the handle through which the php request (or whatever) is made.
Nevertheless I have an area name with no non-alphanumeric characters and I'm still getting the fatal error.
Is there perhaps another level where mistakes have been made in the markup that also affect the layout tool.
Because I haven't ever been able to use the edit layout tool in any of the sites I've used it. I just accept it as a glitch.
I will try to adopt Shosters workaround though...
P.S. I've just noticed in your first post you mentioned even a space will cause the error. Therefore how can I change the areaname without losing my layout. Is there a way?
NIge
Nevertheless I have an area name with no non-alphanumeric characters and I'm still getting the fatal error.
Is there perhaps another level where mistakes have been made in the markup that also affect the layout tool.
Because I haven't ever been able to use the edit layout tool in any of the sites I've used it. I just accept it as a glitch.
I will try to adopt Shosters workaround though...
P.S. I've just noticed in your first post you mentioned even a space will cause the error. Therefore how can I change the areaname without losing my layout. Is there a way?
NIge