#3790 - Critical error when viewing cms:cms-comcode-pages
| Identifier | #3790 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Critical error when viewing cms:cms-comcode-pages |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | core_comcode_pages |
| Description | This 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 |
| Steps to reproduce | |
| Additional information | On 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. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
Fatal error: Call to a member function is_empty() on null in /home/bosslife/public_html/sources/comcode_renderer.php on line 1103
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
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.
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.