View Issue Details

IDProjectCategoryView StatusLast Update
0003790Composrcore_comcode_pagespublic2019-03-21 16:59
ReporterJoeAssigned ToChris Graham 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0003790: Critical error when viewing cms:cms-comcode-pages
DescriptionThis happened just randomly, all I did was delete some old Comcode pages from the CMS zone. Then, this happened:

Fatal error: Call to a member function is_empty() on null in /home/bosslife/public_html/sources/comcode_renderer.php on line 1097

Happens whenever I navigate to cms:cms-comcode-pages
Additional InformationOn a side note, I tried upgrading from 10.0.22 to 10.0.24, but my adminzone doesn't give me the normal "upgrade" message that it usually does. It just tells me my current version with no option to upgrade or message about it being outdated.

I generated an upgrade link from the Composr news article for v10.0.24, fed this into my upgrader, but it keeps trying to do a dry-run even though the checkbox for that option isn't checked.

Something finicky suddenly happened and it may be related to the above reported issue.
TagsNo tags attached.
Time estimation (hours)
Sponsorship open

Activities

Joe

2019-03-19 00:19

reporter   ~0005937

Since the successful upgrade to v10.0.24, the error is still the same, only now it's on line 1,103.

 Fatal error: Call to a member function is_empty() on null in /home/bosslife/public_html/sources/comcode_renderer.php on line 1103

Chris Graham

2019-03-19 03:37

administrator   ~0005938

I think you have a loop with your Comcode [include] tags on a page.

Try this change...

diff --git a/sources/site.php b/sources/site.php
index ef7dd34a0..6872415ed 100644
--- a/sources/site.php
+++ b/sources/site.php
@@ -1175,7 +1175,7 @@ function request_page($codename, $required, $zone = null, $page_type = null, $be
     if ($REQUEST_PAGE_NEST_LEVEL > 20) {
         $REQUEST_PAGE_NEST_LEVEL = 0;
         attach_message(do_lang_tempcode('STOPPED_RECURSIVE_RESOURCE_INCLUDE', escape_html($codename), escape_html(do_lang('PAGE'))), 'warn');
- return null;
+ return new Tempcode();
     }
 
     // Run hooks, if any exist

Joe

2019-03-19 09:54

reporter   ~0005939

I have no idea.

I made the change and it seemed to have worked. But I was curious and reverted your change to the original code, and it's still working. Only thing I did since was add a new page (I had to type in the correct parameters manually into the URL as the cms-comcode-pages wasn't accessible).

I can tell you, I'm 99% sure it doesn't involve an include...I usually don't include pages within pages and haven't used that tag in quite a bit. The only thing I do is include templates within templates.

I'll keep you posted if I have more issues but as for now it's working.

Guest

2019-03-19 15:05

viewer   ~0005940

The Comcode page cache had been cleared I think, meaning it had to rebuild it from all the pages. Any of those pages could have had an include. After the fix the cache got rebuilt, so the fix was no longer needed.

Chris Graham

2019-03-21 16:59

administrator   ~0005941

Main issue fixed.
Dry-run getting stuck on once selected fixed.

I couldn't reproduce or trace an issue related to the upgrade option being missing. There's a 3 hour cache on the upgrade block, and a 5 minute cache on the upgrade info call, but neither should be getting in the way of a version older than 3 hours. If it can't connect to the compo.sr web service it should say so, but I can foresee that not working right in some situations, and our server has been having performance issues (bot attack) recently, so perhaps that is it.

Issue History

Date Modified Username Field Change
2019-03-15 01:07 Joe New Issue
2019-03-19 00:19 Joe Note Added: 0005937
2019-03-19 03:37 Chris Graham Note Added: 0005938
2019-03-19 09:54 Joe Note Added: 0005939
2019-03-19 15:05 Guest Note Added: 0005940
2019-03-21 16:59 Chris Graham Assigned To => Chris Graham
2019-03-21 16:59 Chris Graham Status non-assigned => resolved
2019-03-21 16:59 Chris Graham Resolution open => fixed
2019-03-21 16:59 Chris Graham Note Added: 0005941