Cant add content

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.
Locked
jabberwocky

Cant add content

Post by jabberwocky »

Hi,

I'm pretty new to this, and can't find info in the forums regarding this.

my server specs;

CMSMS 1.01, mySQL 4.1.21-standard-log,    PHP/4.4.4, on Apache 1.3.37 server running Linux.


I got everything installed and started modifying my template and CSS. Once I had a working template, I started removing the default CMS content and renaming pages to suite my needs.  At one point things just kinda stopped responding...or was just really slow. Now, I am trying to add a contact page, but so far, it refuses to show up in my global menu. like this



In the "add pages" section, the previous pages I have 'tried' to add are showing up, but I cant access them, and they are not showing up on any menus. Now I just started getting this error;

Fatal error: Call to a member function on a non-object in /home/koeuscom/public_html/pdl/plugins/function.cms_selflink.php on line 262

from a section that was previously working, and has content in it. I can still edit this page in the admin section. So it seems I cant add new sections to my global nav, or my sub nav, nor can I edit any of the previous pages I created before. Any ideas on what I can do about this?

[gelöscht durch Administrator]
jabberwocky

Re: Cant add content

Post by jabberwocky »

i have now gone into the data base and removed the previous entries that are not showing up, but still I cant add new pages, and content to the site.

Why are there numbers showing up infront of some of the listed menu items (in that graphic above)? Am I supposed to put "4.Contact Info" myself or does it do that on its own?


Also, if I would require to reinstall all of this, how do I keep all the graphical and layout changes intact?

Any help would be appreciated.

cheers
chipus

Re: Cant add content

Post by chipus »

i suggest you to reinstall CMS.

To keep the layout, you could copy the template code and re-enter it again later.

When you re-install, you may choose to re-new your Database or keep the old one. I suggest you to re-new your database. You could try to use the sample code, so you could understand how Page content is added.

The number that is come before the page title, is automatically added to help you keep track of all of your page.

chipus
paranym

Re: Cant add content

Post by paranym »

I think I'm having the same problem. I'm copying my original post into this thread.

I noticed in jabberwocky's screen shot that there are pages numbered 4.1.1, 4.1.2, etc. but no page numbered 4. or 4.1.  I suspect that these latter pages were deleted and the former pages orphaned as a result.

I wonder if the solution is to delete the orphaned pages--which should have been deleted when the parents were deleted.

~Tom

-----
Subject: Orphaned Pages

Greetings and thanks to everyone who's developing this great software.  It's worked quite beautifully until now...

I deleted one of my pages and now I can't seem to add any new pages to the site.  When I try to add pages, I am able to submit them, but they do not appear in the Current Pages view.

I should point out that the page I deleted was the parent of two other pages.  These apparently were not deleted: although I cannot see them in the Current Pages view, they do appear as items in the Parent drop-down list when I try to create new pages.  All new pages appear in the Parent drop-down list as well--even though they don't appear in the Current Pages view.

Here's my current set-up.

CMSMS: 1.0.1
PHP: 4.4.1
MySQL: 4.1.20

I think my ISP is running IIS 6.0 on Windows Server 2003.  (I know Windows isn't officially supported, but everything's worked fine until now.)

I'm wondering if I should go into myqsl command-line client and delete the orphaned pages from cms_content.  But I'd want to delete any related records as well from other tables, and I don't really know how I'd do that.

Thanks in advance for any help.

~Tom
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Cant add content

Post by Dee »

I ran into the same sort of issue with a too low max_execution_time setting in php.ini (30).
The only way I could solve it was to create a new page and move all the "orphaned" pages under it (so their hierarchy position was rewritten).
chipus

Re: Cant add content

Post by chipus »

hi Dee, i'm glad if we could do it. However, after delete the parents, the orphan pages may not appear in the list (in my case). We still could see it if we choose "Re-order" page. However, i don't think we could do anything with it now.

Therefore, i suggest we backup the content, and re-install cms.

@All: I think CMS should ask users before they try to delete a parent page, and if they want to delete a parent page, all children pages should be deleted also.

Chipus
Last edited by chipus on Tue Sep 26, 2006 5:11 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Cant add content

Post by Dee »

chipus wrote: hi Dee, i'm glad if we could do it. However, after delete the parents, the orphan pages may not appear in the list (in my case). We still could see it if we choose "Re-order" page. However, i don't think we could do anything with it now.

Therefore, i suggest we backup the content, and re-install cms.
Could be I manually set the parent_id to 0 in the database (had to do quite some kung-fu to sort the matter) before adding them to a temporary parent. I suggest setting max_execution_time to a higher value than default (30) to prevent these kind of issues.
chipus wrote: @All: I think CMS should ask users before they try to delete a parent page, and if they want to delete a parent page, all children pages should be deleted also.
That was a bug, which is fixed in SVN already (the bin icon shouldn't show for parents):
http://viewsvn.cmsmadesimple.org/viewsv ... 0&view=rev
paranym

Re: Cant add content

Post by paranym »

Using a test CMSMS installation, I was able to recreate the problem.

Deleting the orphaned pages from the cms_content and cms_content_props tables appears to fix the problem.

Can anyone tell me if I'm properly deleting all the associated records?  I'm using the following commands in MySQL:

Code: Select all

delete from cms_content where content_id=XXX;
delete from cms_content_props where content_id=XXX;
...where XXX is the content_id number of the orphaned page...which was determined from listing all records in the cms_content table:

Code: Select all

select * from cms_content;
Thanks in advance for any help.

~Tom
jabberwocky

Re: Cant add content

Post by jabberwocky »

thanks for the suggestions peeps. i appreciate it. I tried clearing the tables in the database of related content, and things started turning around, but not all the way.

i am just in the process of reinstalling, after backing up my templates.

thanks again!

cheers
josephc

Re: Cant add content

Post by josephc »

I would like to delete the orphaned content from the cms database as suggested above. However I don't want to lose any relational data to other database content, can anyone recommend the most secure way of a doing this? Also how do I ensure that I have delete all entries relating to the orphaned content, is it enough to delete from the two tables mentioned above (cms_content and cms_content_props)?

Many thanks in advance
Pierre M.

Re: Cant add content

Post by Pierre M. »

Hello,

orphaned pages ? which version of CMSms are you running ?

Pierre M.
josephc

Re: Cant add content

Post by josephc »

Hi

I'm running CMS version 1.0.1.

Since deleting a parent page without deleting the child pages first I keep getting a fatal error message when I try to add or edit  pages/content.

paranym suggests that the orphaned pages (undeleted chlid pages) should be deleted from the CMS database in order to correct the problem. I want to ensure that deleting these pages from the database won't affect any other content in the database i.e relational connections between the data.

I hope this answers your question.
Pierre M.

Re: Cant add content

Post by Pierre M. »

Hello Joseph,
josephc wrote: I'm running CMS version 1.0.1.

Since deleting a parent page without deleting the child pages first I keep getting a fatal error message when I try to add or edit  pages/content.
I hope current version doesn't allow to orphan pages : when I try to delete a parent page, CMSms asks for confirmation for deletion of the parent page and all subchildren pages, hence not producing orphaned pages. The most important here is to run the current stable version (1.1.x today) and no more any 1.0.x.
josephc wrote: paranym suggests that the orphaned pages (undeleted chlid pages) should be deleted from the CMS database in order to correct the problem. I want to ensure that deleting these pages from the database won't affect any other content in the database i.e relational connections between the data.
I think your best friend is database backup. Make backups, know how to restore. Then you can try to get rid of what is disturbing you and upgrade asap to 1.1.x. But backup to be sure nothing could be affected after a restore.

Pierre M.
zjbbbd

Re: Cant add content

Post by zjbbbd »

i had the same problem. at first everithink was ok but later somethink happend and now i can't make a new pages!!!
its nonsesnse to reinstall cms and all info, so i made jus a few changes on lib/classes/class.content.inc.php
line ~1103
and now i can normaly create new pages

/*
$query = "INSERT INTO ".$config["db_prefix"]."content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy, id_hierarchy, active, default_content, show_in_menu, cachable, menu_text, markup, metadata, titleattribute, accesskey, tabindex, last_modified_by, create_date, modified_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
   
$dbresult = $db->Execute($query, array(
$newid,
$this->mName,
$this->mAlias,
strtolower($this->mType),
$this->mOwner,
$this->mParentId,
$this->mTemplateId,
$this->mItemOrder,
$this->mHierarchy,
$this->mIdHierarchy,
($this->mActive == true        ? 1 : 0),
($this->mDefaultContent == true ? 1 : 0),
($this->mShowInMenu == true    ? 1 : 0),
($this->mCachable == true      ? 1 : 0),
$this->mMenuText,
$this->mMarkup,
$this->mMetadata,
$this->mTitleAttribute,
$this->mAccessKey,
$this->mTabIndex,
$this->mLastModifiedBy,
$this->mModifiedDate,
$this->mCreationDate
));
*/
$query = "INSERT INTO ".$config["db_prefix"]."content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy, id_hierarchy, active, default_content, show_in_menu, cachable, menu_text, markup, metadata, titleattribute, accesskey, tabindex, last_modified_by, create_date, modified_date) VALUES
(
'".$newid."',
'".$this->mName."',
'".$this->mAlias."',
'".strtolower($this->mType)."',
'".$this->mOwner."',
'".$this->mParentId."',
'".$this->mTemplateId."',
'".$this->mItemOrder."',
'".$this->mHierarchy."',
'".$this->mIdHierarchy."',
'".($this->mActive == true        ? 1 : 0)."',
'".($this->mDefaultContent == true ? 1 : 0)."',
'".($this->mShowInMenu == true    ? 1 : 0)."',
'".($this->mCachable == true      ? 1 : 0)."',
'".$this->mMenuText."',
'".$this->mMarkup."',
'".$this->mMetadata."',
'".$this->mTitleAttribute."',
'".$this->mAccessKey."',
'".$this->mTabIndex."',
'".$this->mLastModifiedBy."',
'".$this->mModifiedDate."',
'".$this->mCreationDate."')";

mysql_query($query) or die(mysql_error()."".$query);
Locked

Return to “CMSMS Core”