Something preventing page load w/ error preg_replace(): Compilation failed: missing ) at offset 205

Permalink
OK, I'd really appreciate any suggestions to help figure out what's the cause of this
(in 5.7.5.2 ),

I have SOMETHING that is breaking a page when one specific page area is used. If I rename the Area, everything is fine (I was troubleshooting to figure out the problem, and "solved" it by discovering this).
In other words, the area is called "Section 2", and the page will not load. Viewing the Page source, I found the following error at the point of failure

"preg_replace(): Compilation failed: missing ) at offset 205"

If I rename the area to something else, everything works fine.

I do not know what block is in this area. I'd really like to get to the root of this.
The code for the area is
<?php
$a = new Area('Section 2');
$a->enableGridContainer();
$a->display($c);
?>

Suggestions? Maybe looking in the database (but where exactly and for what?), and then what?

OKDnet
 
OKDnet replied on at Permalink Reply
OKDnet
Hmmm. Still don't know.
?
mnakalay replied on at Permalink Reply
mnakalay
Hello, just 2 things that come to mind:
1- What did you rename the area to make it work?
2- Are you sure there isn't already an area called Section 2 anywhere on that page type or in the footer/header elements?
OKDnet replied on at Permalink Reply
OKDnet
Hi Nour,

1- I renamed it Section1 (instead of "Section 1"), but anything unique works fine.
2- I'm sure. I use "Section 1" on other page templates, but it's nowhere else on this page (or the header or footer elements). I wish it was such a simple oversight.

The fact that this happened on the Home Page made it even more "interesting" because I couldn't just delete the page

Thanks for trying to help. I was wondering if anybody would. Any other ideas? The fact that the error message says "Compilation failed: missing ) at offset 205" should be a clue. What is being "compiled"? Is that the term Concrete5 uses for rendering the page itself?
mnakalay replied on at Permalink Reply
mnakalay
I did some tests on my system and I can confirm that the name itself shouldn't be a problem and even if you had 2 areas named the same, it wouldn't throw an error.

Because the message mention compilation, and totally on a hunch, can you try to comment out
$a->enableGridContainer();

and see if it fixes the problem?
OKDnet replied on at Permalink Reply
OKDnet
Hehehe. I guess I had the same "hunch". That was one of the first things I tried.

If we can get a more meaningful error message, that might help.
mnakalay replied on at Permalink Reply
mnakalay
you go to system & settings and under environment, you click on Debug Settings. There you select "Show the debug error output"