[solved] Can't Change page parent

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

[solved] Can't Change page parent

Post by moorezilla »

[CalGuy figured this out. Shouldn't affect too many other people. Fix coming in upcoming CMSMS release]

Going to Content Manager, Navigation tab for a page, choosing a different parent from the dropdown triggers an ajaxy refresh, but doesn't seem to select a new parent. Tried in latest Chrome and latest Firefox. Parent selection goes back to "None" after selecting a new parent.

Seems to be some old posts about this, but nothing in 2.1.1.

System Information:

----------------------------------------------
Cms Version: 2.1.1
Installed Modules:
FileManager: 1.5.2
MenuManager: 1.50.2
News: 2.50.3
Search: 1.50.2
ThemeManager: 1.1.8
CGExtensions: 1.51
DesignManager: 1.1.1
ModuleManager: 2.0.1
CGBlog: 1.13.3
CGSimpleSmarty: 2.0.2
Gallery: 2.0.3
SiteMapMadeSimple: 1.2.8
AdminSearch: 1.0
JQueryTools: 1.3.8
LISEchsCourses: 1.1
CMSContentManager: 1.1
LISE: 1.1
MicroTiny: 2.0.2
Navigator: 1.0.2

Config Information:
php_memory_limit:
max_upload_size: 100000000
url_rewriting: mod_rewrite
page_extension: .htm
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: America/New_York
permissive_smarty: false

Php Information:
phpversion: 5.6.16
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 200M
max_execution_time: 90
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 100M
upload_max_filesize: 100M
session_save_path: /var/lib/php/session (0770)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:
allow_browser_cache: On (True)
browser_cache_expiry: 15
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache/2.2.17 (EL)
Server Api: apache2handler
Server Os: Linux 2.6.32-042stab104.1 On i686
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.46
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:
tmp: /var/www/html/cps/tmp (0770)
tmp_cache: /var/www/html/cps/tmp/cache (0770)
templates_c: /var/www/html/cps/tmp/templates_c (0770)
modules: /var/www/html/cps/modules (0770)
uploads: /var/www/html/cps/uploads (0770)
File Creation Mask (umask): /var/www/html/cps/tmp/cache (0770)
config_file: 0440
----------------------------------------------
Last edited by moorezilla on Thu Jan 14, 2016 5:54 pm, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: Can't Change page parent

Post by Jo Morg »

I just tested and it is working fine on my online and test sites....
Check your php error logs, admin logs for anything out of the ordinary...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

full of breadcrumb/template errors at the moment:
[Tue Jan 05 14:05:25 2016] [error] [client 66.249.66.171] PHP Notice: Undefined index: spanclass in /var/www/html/cps/tmp/templates_c/1c7570b5104d51c91b55f34321a8460292f9fa68.cms_template.Breadcrumbs.php on line 40
[Tue Jan 05 14:05:25 2016] [error] [client 66.249.66.171] PHP Notice: Trying to get property of non-object in /var/www/html/cps/tmp/templates_c/1c7570b5104d51c91b55f34321a8460292f9fa68.cms_template.Breadcrumbs.php on line 40
[Tue Jan 05 14:05:35 2016] [error] [client 50.203.0.6] PHP Notice: Undefined index: spanclass in /var/www/html/cps/tmp/templates_c/1c7570b5104d51c91b55f34321a8460292f9fa68.cms_template.Breadcrumbs.php on line 40
[Tue Jan 05 14:05:35 2016] [error] [client 50.203.0.6] PHP Notice: Trying to get property of non-object in /var/www/html/cps/tmp/templates_c/1c7570b5104d51c91b55f34321a8460292f9fa68.cms_template.Breadcrumbs.php on line 40
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

I fixed that template error. No other php errors generated since fix. I'll see if I can find any other errors in the log moving forward.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

debug from nav tab on content manager page:

This one maybe?: "* FROM cms_content_props WHERE content_id = 159
Debug: (0.051845) - (usage: 2967072) - (peak: 2986424) Nothing is known about -1... cant load it"
Debug: (0.001108) - (usage: 244000) - (peak: 246904) loading page functions
Debug: (0.001187) - (usage: 244412) - (peak: 247428) loading content functions
Debug: (0.0012340000000001) - (usage: 244700) - (peak: 247764) loading translation functions
Debug: (0.001279) - (usage: 245052) - (peak: 247972) loading php4 entity decode functions
Debug: (0.00132) - (usage: 245348) - (peak: 248224) done loading files
Debug: (0.0013500000000001) - (usage: 245540) - (peak: 248476) Initialize Database
Debug: (0.0028210000000001) - (usage: 424756) - (peak: 431252) (mysqli): SET NAMES 'utf8'
Debug: (0.0028680000000001) - (usage: 424180) - (peak: 431436) Done Initializing Database
Debug display of 'Loading Modules':(0.003494) - (usage: 497488) - (peak: 602904)
Debug: (0.004055) - (usage: 510552) - (peak: 602904) (mysqli): SELECT * FROM cms_modules ORDER BY module_name
Debug: (0.0046710000000001) - (usage: 530748) - (peak: 602904) (mysqli): SELECT parent_module,child_module,minimum_version FROM cms_module_deps ORDER BY parent_module
Debug: (0.006884) - (usage: 886456) - (peak: 888848) (mysqli): SELECT * FROM cms_userplugins ORDER BY userplugin_name
Debug: (0.008374) - (usage: 956628) - (peak: 960448) (mysqli): SET @CG_ZEROTIME = NOW() - INTERVAL 150 YEAR,@CG_FUTURETIME = NOW() + INTERVAL 5 YEAR
Debug: (0.009949) - (usage: 1098588) - (peak: 1102860) (mysqli): SELECT preference,value FROM cms_userprefs WHERE user_id = '1'
Debug: (0.012675) - (usage: 1240972) - (peak: 1246884) (mysqli): SELECT item_id,url FROM cms_module_lise_item WHERE url != ''
Error (1146): Table 'district.cms_module_lise_item' doesn't exist
Debug: (0.014877) - (usage: 1373800) - (peak: 1389136) (mysqli): SELECT item_id,url FROM cms_module_lisechscourses_item WHERE url != ''
Debug display of 'End of Loading Modules':(0.015124) - (usage: 1390372) - (peak: 1404648)
Debug: (0.015179) - (usage: 1390728) - (peak: 1404760) Initialize Smarty
Debug: (0.015215) - (usage: 1390984) - (peak: 1404836) Done Initialiing Smarty
Debug: (0.015325) - (usage: 1392932) - (peak: 1406024) original memory is 119496
Debug: (0.01701) - (usage: 1512616) - (peak: 1520176) (mysqli): SELECT * FROM cms_layout_tpl_type WHERE originator = '__CORE__' AND name = 'page' LIMIT 1
Debug: (0.017492) - (usage: 1514688) - (peak: 1522168) (mysqli): SELECT * FROM cms_layout_templates WHERE type_id = '1' AND type_dflt = 1 LIMIT 1
Debug: (0.017875) - (usage: 1529700) - (peak: 1536556) (mysqli): SELECT id FROM cms_layout_designs WHERE dflt = 1 LIMIT 1
Debug: (0.018206) - (usage: 1531144) - (peak: 1538024) (mysqli): SELECT * FROM cms_layout_designs WHERE id = 9 LIMIT 1
Debug: (0.018545) - (usage: 1532340) - (peak: 1539504) (mysqli): SELECT css_id FROM cms_layout_design_cssassoc WHERE design_id = 9 ORDER BY item_order
Debug: (0.01887) - (usage: 1532736) - (peak: 1540360) (mysqli): SELECT tpl_id FROM cms_layout_design_tplassoc WHERE design_id = 9
Debug: (0.019309) - (usage: 1542468) - (peak: 1549284) (mysqli): SELECT group_id FROM cms_user_groups WHERE user_id = 1
Debug: (0.021127) - (usage: 1655300) - (peak: 1709144) (mysqli): SELECT * FROM cms_content WHERE content_id = 159 LIMIT 1
Debug: (0.046016) - (usage: 2714712) - (peak: 2742876) (mysqli): SELECT SQL_CALC_FOUND_ROWS tpl.id FROM cms_layout_templates tpl
LEFT JOIN cms_layout_tpl_type type ON tpl.type_id = type.id ORDER BY tpl.name asc LIMIT 0, 1000
Debug: (0.046241) - (usage: 2716020) - (peak: 2742876) (mysqli): SELECT FOUND_ROWS() LIMIT 1
Debug: (0.047685) - (usage: 2732184) - (peak: 2745136) (mysqli): SELECT tpl_id,design_id FROM cms_layout_design_tplassoc
WHERE tpl_id IN (43,30,69,31,58,1,44,45,7,2,34,59,49,8,10,35,46,71,36,50,60,66,61,65,51,3,37,52,62,67,68,42,38,63,40,41,64,53,54,6,23,19,24,20,21,4,22,15,16,55,56,17,9,5) ORDER BY tpl_id
Debug: (0.048904) - (usage: 2739724) - (peak: 2750136) (mysqli): SELECT * FROM cms_layout_templates WHERE id IN (43,30,69,31,58,1,44,45,7,2,34,59,49,8,10,35,46,71,36,50,60,66,61,65,51,3,37,52,62,67,68,42,38,63,40,41,64,53,54,6,23,19,24,20,21,4,22,15,16,55,56,17,9,5)
Debug: (0.050337) - (usage: 2948400) - (peak: 2960220) (mysqli): SELECT * FROM cms_layout_designs ORDER BY name ASC
Debug: (0.051302) - (usage: 2958580) - (peak: 2970608) (mysqli): SELECT * FROM cms_content_props WHERE content_id = 159
Debug: (0.051845) - (usage: 2967072) - (peak: 2986424) Nothing is known about -1... cant load it
Debug: (0.063388) - (usage: 3020968) - (peak: 3041576) (mysqli): SELECT content_id FROM cms_content WHERE owner_id = '1' ORDER BY hierarchy
Debug: (0.064654) - (usage: 3037028) - (peak: 3058012) (mysqli): SELECT user_id, username, password, first_name, last_name, email, active, admin_access
FROM cms_users ORDER BY username LIMIT 0, 10000
Debug: (0.065017) - (usage: 3038568) - (peak: 3058532) (mysqli): SELECT user_id FROM cms_additional_users WHERE content_id = '159'
Debug: (0.065604) - (usage: 3046668) - (peak: 3065096) (mysqli): SELECT group_id, group_name, group_desc, active FROM cms_groups ORDER BY group_id
Debug display of 'Fetch module_file_tpl:CMSContentManager;admin_editcontent.tpl start':(0.066374) - (usage: 3049940) - (peak: 3069052)
Debug display of 'Fetch module_file_tpl:CMSContentManager;admin_editcontent.tpl end':(0.181951) - (usage: 3194820) - (peak: 3287268)
Debug: (2.8000000000028E-5) - (usage: 3189976) - (peak: 3287268) before theme load
Debug: (8.0999999999998E-5) - (usage: 3191408) - (peak: 3287268) after theme load
Debug: (0.00012900000000005) - (usage: 3191940) - (peak: 3287268) before notifications
Debug: (0.000444) - (usage: 3199192) - (peak: 3287268) before populate admin navigation
Debug: (0.0017780000000001) - (usage: 3231972) - (peak: 3287268) before menu items
Debug: (0.003089) - (usage: 3252968) - (peak: 3287268) after menu items
Debug: (0.003464) - (usage: 3258308) - (peak: 3287268) before system modules
Debug: (0.0039360000000001) - (usage: 3268832) - (peak: 3287268) before non system module menu items
Debug: (0.004236) - (usage: 3274116) - (peak: 3291844) after non system module menu items
Debug: (0.006765) - (usage: 3299404) - (peak: 3311720) after populate admin navigation
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Can't Change page parent

Post by calguy1000 »

This one maybe?: "* FROM cms_content_props WHERE content_id = 159
Debug: (0.051845) - (usage: 2967072) - (peak: 2986424) Nothing is known about -1... cant load it"
This message (not the -1 part, don't know what that's from) comes from the module loading stuff.

Is this a site upgraded from 1.x?

So... it looks like there is a corruption in the database. since it comes directly when trying to load a content page, I think you had a module installed like AdvancedContent or FEU or something that exported new content types. And you had one (or more) content pages of those types exported from said module(s).

Then, when you upgraded you uninstalled or disabled said module, and now the system does not know anything about that content type.

please confirm.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

Definitely an upgraded installation... and one that dates all the way back to before the 1.0 release of CMSMS, so it's been updated through all those releases to this point.

FEU was definitely installed at one point, and it was removed at some point when protected areas were no longer needed.

As an update to above, I just tried changing the parent page with the options / reorder content functionality in the content manager, and that seems to work fine. So to be more clear, changing the parent with the drop down lists under the nav tab does not work for me, whereas using the reorder content option on the index of all pages does work. Really seems like a javascript issue, but I can't find any javascript errors. I'm at a loss.

I just tried the dropdown parent switch on an install that never had feu or custom content installed and I can confirm that the drop down parent switch works on that install. Might be on to something with the removed module(s).
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Can't Change page parent

Post by calguy1000 »

Okay.... then I am probably correct.

I suggest you use phpmyadmin or something to execute this query:

Code: Select all

select distinct type from cms_content;
Of course you may have to edit the table name if your db prefix is different than cms_ in your config.php

It will list all of the content types for all of your pages.

IF you find something like 'protected-page' or 'advancedcontent' or something that clearly does not make sense then you can try:

a: make a complete backup of your site
b: execute this sql query:

Code: Select all

update cms_content set type = 'content' where type = '<unknown type>'


The worst this could potentially do is take some of your separators, section headers, links, etc. and convert them to content pages... but you should be able to at that point change them back to what they are supposed to be.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

Thanks for this, CG. I will tackle this tomorrow and post back the results. Much appreciated.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

Got to it before leaving:

Query came up with:

type:
content
link
errorpage
pagelink

I don't see any obvious errors to convert.

I don't know if this is a clue, and there are not that many pages on the site (less than 150), but when I display the list of pages in the content manager, I often see the blue circles rotating in a counter clockwise direction (looks like a loading animation to me). Site runs very fast, so I don't see any obvious bottleneck.

I'll look for more tomorrow.

Edit: perhaps another clue. I have an unhandled notification in my admin area that reads: "You have 1 News article(s) that is/are not published," but there is no unpublished news article in the list of news articles. Also, there is a link in the unhandled notification message (probably to the news item in question) but following that link just logs me out and pulls the login screen.

Edit: unhandled notification was a red herring. The pseudocron was just slow.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

Attached files show that page in question (improvement plans) appears to have proper hierarchy in list view, but when the page is viewed in the content manager under the navigation tab, the parents are not populated in the dropdown.

The reorder content functionality seems to work fine, as I moved the page to a new parent, but the dropdown parent modification under the navigation tab on an individual page seems to be broken.

Is it possible that this navigation tab parent switch functionality changed in 2.1 or in 2.1.1? I swear that I changed a few page parents under the nav tab after having upgraded to 2.0.x without issue.
Attachments
Viewing page in content manager shows no parent under navigation tab.
Viewing page in content manager shows no parent under navigation tab.
Shows hierarchy, and the page appears correctly on site.
Shows hierarchy, and the page appears correctly on site.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

One other error popped up in error_log. Probably not related but here it is in case it's of help:
PHP Notice: Trying to get property of non-object in /tmp/templates_c/SiteMapMadeSimple^500c519eb1ab618a432178b426ad95440bac02c0.module_db_tpl.SiteMapMadeSimple;xml_pagenewsblog.php on line 62, referer: /cps/admin/moduleinterface.php?mact=SiteMapMadeSimple,m1_,defaultadmin,0&_sk_=768f92e282093f97
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Can't Change page parent

Post by calguy1000 »

This one maybe?: "* FROM cms_content_props WHERE content_id = 159
Debug: (0.051845) - (usage: 2967072) - (peak: 2986424) Nothing is known about &#45;1... cant load it"
I chased this down in the code... and it appears that you may have a corruption on your cms_modules table.

maybe take a look at that?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
moorezilla
Forum Members
Forum Members
Posts: 24
Joined: Mon May 19, 2014 5:08 pm

Re: Can't Change page parent

Post by moorezilla »

Definitely some weirdness on that table. I've attached an image. Theme Manager appears in mysql, but does not appear in module manager. NuSoap also appears in mysql, but not in module manager. Perhaps this is what's wrong?

Perhaps I should just drop the problem rows/entries from mysql?
Screen Shot 2016-01-06 at 1.18.52 PM.png
Module Manager
modulemanager.png
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Can't Change page parent

Post by calguy1000 »

yep, I would delete those rows.
also do a repair tables
and pay attention to your http error log. there may be other messages in there.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”