Add Layout Error
Permalink 1 user found helpful
I am recieving this error when I edit the layout.
Fatal error: Call to a member function getAreaHandle() on a non-object in /home/html2c5/public_html/concrete/tools/edit_area_popup.php on line 27
Yep...
I did upgrade my other site and I didn't get the same error.
Maybe I should just to a fresh install, there isn't that much content/pages.
I did upgrade my other site and I didn't get the same error.
Maybe I should just to a fresh install, there isn't that much content/pages.
Just cleaned up some code in my default.php
Cheers,
Thomas
Cheers,
Thomas
Hm, I do get the same error. Anybody else experiencing this problem? I did a fresh install and everytime I try to edit a layout, this problem occurs.
i can't reproduce this error, but i'd be willing to take a look at it if you can send me the access info for your server? if so, just use the private message link through my profile.
It is do do with your theme there was an extra div and I had to remove it. If your theme is clean there wont be any error.
For example this was only being caused in the main not the side bar.
So I looked at my main area and cleaned it up.
So if you don't get the error than its clean if you get it it means you should re look at your theme. Even if was approved on the MP it could still be causing problems i.e. c25 is known to cause some errors.
Hope this works.
Cheers,
Thomas
For example this was only being caused in the main not the side bar.
So I looked at my main area and cleaned it up.
So if you don't get the error than its clean if you get it it means you should re look at your theme. Even if was approved on the MP it could still be causing problems i.e. c25 is known to cause some errors.
Hope this works.
Cheers,
Thomas
Hey Thomas,
thank you for your fast response. I found out that one of my themes had a space-sign in its name and this caused the error. Now it's working perfectly!
Best regards
Hauke
thank you for your fast response. I found out that one of my themes had a space-sign in its name and this caused the error. Now it's working perfectly!
Best regards
Hauke
Bumping because I'm getting the same error on both of my C5 sites with the newest version.
What do you mean by 'clean up' code? here is my code for my page's layout.
<div id="outerWrapper">
<div id="header"></div>
<div id="contentWrapper">
<div id="leftColumn1">
<?php
$a = new Area('Menu');
$a->display($c);
?>
</div>
<div id="rightColumn1">
<?php
$a = new Area('Right Column Content');
$a->display($c);
?>
</div>
<div id="content">
<?php
$a = new Area('Main Content');
$a->display($c);
?>
</div>
<br class="clearFloat" />
</div>
<div id="footer">
</div>
</div>
</div>
What do you mean by 'clean up' code? here is my code for my page's layout.
<div id="outerWrapper">
<div id="header"></div>
<div id="contentWrapper">
<div id="leftColumn1">
<?php
$a = new Area('Menu');
$a->display($c);
?>
</div>
<div id="rightColumn1">
<?php
$a = new Area('Right Column Content');
$a->display($c);
?>
</div>
<div id="content">
<?php
$a = new Area('Main Content');
$a->display($c);
?>
</div>
<br class="clearFloat" />
</div>
<div id="footer">
</div>
</div>
</div>
I got it. No spaces in your content area's name.
this space issue should be fixed in concrete's next point release.
I just got this error again when editing my page. It's not the naming issue, but something else now. Any other known issues with this feature?
Until the next release, the solution is to put urldecode() around $_GET['arHandle'] on line 4 of /root/concrete/tools/edit_area_popup.php so that it looks like this:
$a = Area::get($c, urldecode($_GET['arHandle']));
The layout designer itself is adding the spaces to the area name, especially when embedding a layout within a layout.
In delving into this a bit more, there are 15 occurrences within the core where $_GET['arHandle'] is missing urldecode() around it. Tony pointed out that this issue is fixed in the next point release, so I'm assuming all of these occurences were fixed.
But in the meantime, for those of us who need a fix now, here's where they all are:
/root/concrete/blocks/form/tools/services.php, lines 7 and 9.
/root/concrete/blocks/page_list/tools/rss.php, line 7.
/root/concrete/elements/block_area_groups.php, line 27.
/root/concrete/startup/process.php, lines 115, 141, 180, 208, 225, 239, 271, 507.
/root/concrete/tools/edit_area_popup.php, line 4.
/root/concrete/tools/layout_services.php, line 5.
Might also need to change most occurrences of $_REQUEST['arHandle'] as well. There are around 15 of these.
/root/concrete/controllers/dashboard/scrapbook/controller.php, line 66.
/root/concrete/startup/process.php, lines 50, 60, 72, 161, 483, 570.
/root/concrete/tools/add_block_popup.php, line 8.
/root/concrete/tools/dashboard/scrapbook_services.php, line 17.
/root/concrete/tools/edit_area_scrapbook_refresh.php, line 13.
/root/concrete/tools/edit_block_popup.php, line 16.
/root/concrete/tools/marketplace/refresh_block.php, line 25.
/root/concrete/tools/pile_manager.php, lines 26, 109, 126.
(By the way, I have not extensively tested all these, so do this at your own risk)
$a = Area::get($c, urldecode($_GET['arHandle']));
The layout designer itself is adding the spaces to the area name, especially when embedding a layout within a layout.
In delving into this a bit more, there are 15 occurrences within the core where $_GET['arHandle'] is missing urldecode() around it. Tony pointed out that this issue is fixed in the next point release, so I'm assuming all of these occurences were fixed.
But in the meantime, for those of us who need a fix now, here's where they all are:
/root/concrete/blocks/form/tools/services.php, lines 7 and 9.
/root/concrete/blocks/page_list/tools/rss.php, line 7.
/root/concrete/elements/block_area_groups.php, line 27.
/root/concrete/startup/process.php, lines 115, 141, 180, 208, 225, 239, 271, 507.
/root/concrete/tools/edit_area_popup.php, line 4.
/root/concrete/tools/layout_services.php, line 5.
Might also need to change most occurrences of $_REQUEST['arHandle'] as well. There are around 15 of these.
/root/concrete/controllers/dashboard/scrapbook/controller.php, line 66.
/root/concrete/startup/process.php, lines 50, 60, 72, 161, 483, 570.
/root/concrete/tools/add_block_popup.php, line 8.
/root/concrete/tools/dashboard/scrapbook_services.php, line 17.
/root/concrete/tools/edit_area_scrapbook_refresh.php, line 13.
/root/concrete/tools/edit_block_popup.php, line 16.
/root/concrete/tools/marketplace/refresh_block.php, line 25.
/root/concrete/tools/pile_manager.php, lines 26, 109, 126.
(By the way, I have not extensively tested all these, so do this at your own risk)
Can you reproduce this error on more than one c5 site?