CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11612] Setting Parent to itself it breaks complete frontend and Content Manager

avatar
Created By: Tristan (tristan)
Date Submitted: Fri Oct 20 04:25:13 -0400 2017

Assigned To:
Version: 2.2.3.1
CMSMS Version: 2.2.3.1
Severity: Major
Resolution: Invalid
State: Closed
Summary:
Setting Parent to itself it breaks complete frontend and Content Manager
Detailed Description:
Steps to replicate on a clean install without sample content:

1. Open the "Home Page" in Content Manager
2. At the Navigation tab set Parent to "Home Page" (itself) and hit Submit.

The submit will timeout after the maximum PHP execution time:

[Fri Oct 20 10:05:19.684863 2017] [:error] [pid 4954] [client
82.161.218.47:57697] PHP Fatal error:  Maximum execution time of 30 seconds
exceeded in
/home/prism/domains/prism.nl/public_html/test/lib/classes/class.contentoperations.inc.php
on line 439, referer: https://prism.nl/

When you return to the admin page at the Content Manager there will be no
content listed anymore just an "Problem with internal content organization...
could not get a parent node for content with id 1" error. At the frontend all
pages will display an "Oops! Sorry, it looks like something went wrong and an
error has occurred. Don’t worry, it can happen to any of us."

ERROR: at line 106 in file
/home/prism/domains/prism.nl/public_html/test/lib/classes/class.cms_tree_operations.php:

Message:

Problem with internal content organization... could not get a parent node for
content with id 1
Close Full Trace ↑
#0
/home/prism/domains/prism.nl/public_html/test/lib/classes/class.contentoperations.inc.php(104):
cms_tree_operations::load_from_list(Array)
#1
/home/prism/domains/prism.nl/public_html/test/lib/classes/internal/class.global_cachable.php(24):
ContentOperations::{closure}()
#2
/home/prism/domains/prism.nl/public_html/test/lib/classes/internal/class.global_cache.php(26):
CMSMS\internal\global_cachable->fetch()
#3
/home/prism/domains/prism.nl/public_html/test/lib/classes/class.CmsApp.php(462):
CMSMS\internal\global_cache::get('content_tree')
#4
/home/prism/domains/prism.nl/public_html/test/lib/classes/class.contentoperations.inc.php(242):
CmsApp->GetHierarchyManager()
#5 /home/prism/domains/prism.nl/public_html/test/index.php(81):
ContentOperations->LoadContentFromAlias('1', true)
#6 {main}

To fix this you have to manually edit the page in the cms_content table and
change the parent_id to -1. After a Clear Cache at System Maintanance you should
be good again.

When trying to set Parent to itself at the Navigation tab you should get an
error when trying to Submit like when you try to set the Destination Page of an
Internal Page Link to itself (A page link cannot list another page link as its
destination). Additionally somewhat better error handling if one page has a
faulty parent_id it won't break all the frontend pages for all site visitors
would be nice.


History

Comments
avatar
Date: 2017-10-20 08:49
Posted By: Matt Hornsby (DIGI3) (DIGI3)

Duplicate of bug #11555, already fixed in svn
      
Updates

Updated: 2017-10-20 08:49
state: Open => Closed

Updated: 2017-10-20 08:49
resolution_id: => 9