Page 1 of 2

Error with “Add New Content”

Posted: Sat Jan 22, 2011 3:49 pm
by farhadprm
Hi,
I have installed the version 1.9.2 CMSMS and right now I have the problem with the creation of new pages. When I click “Add New Content” and I try to create a new page, I receive the following error:

Code: Select all

INSERT INTO cms_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, secure, page_url, menu_text, markup, metadata, titleattribute, accesskey, tabindex, last_modified_by, create_date, modified_date) VALUES (77,'Projects','projects','content','1','71','15',1,'','',1,0,1,1,'0','','Projects','html','','','','','1','2011-01-22 15:35:54','2011-01-22 15:35:54')
Duplicate entry '77' for key 'PRIMARY'
Could somebody kindly explain what the problem could be?

Thank you in advance for your time

Far

Re: Error with “Add New Content”

Posted: Sat Jan 22, 2011 5:18 pm
by Dr.CSS
Do you have more than one {content} in your template?...

Re: Error with “Add New Content”

Posted: Sat Jan 22, 2011 6:18 pm
by farhadprm
Thank you for your reply.

yes, I havo more than one {content} in my template. But even if I try to create a page with "minimal template" I get the same error. However, in the meantime I edited "config.php" and I removed "mod_rewrite" and now I can add the pages, but still I did not understand what is the problem?

Many thanks
Far

Re: Error with “Add New Content”

Posted: Thu Feb 24, 2011 6:02 pm
by Bilmartech
I am experiencing the same exact problem now.. any solutions? When I create new content it says successful but does not show up in the pages in the admin section.

When i check the database the new page is there but the content_ID is 0 and if I attempt to add a new page via admin, I get the duplicate error because obviously content_ID 0 is what the new page content is trying to give that ID to.

I am not an expert but it appears to be something to do with the assigning of the unique content ID numbers that seems messed up some where?

Re: Error with “Add New Content”

Posted: Thu Feb 24, 2011 6:18 pm
by Bilmartech
OK so I played around with the database and have no idea if I should have done this BUT it worked!

I opened up the table for cms_content and clicked on the edit pencil next to the content_id row. On there I selected the drop down box next to extras that says auto_increment and went back and tried to add content again from the admin section and it worked.

I went back to the database and sure enough the page shows up there with the very next number in the content_id field...

So I have no idea why it did it or what but this seemed to work.. so my question now is... why did it happen in the first place and did will changing that setting cause anything else silly to happen in any way?

Re: Error with “Add New Content”

Posted: Thu Mar 10, 2011 11:54 pm
by factor1
im having similar issues, but the auto-increment didnt help me

Re: Error with “Add New Content”

Posted: Thu Mar 10, 2011 11:59 pm
by farhadprm
factor1 wrote:im having similar issues, but the auto-increment didnt help me
I have resolved the problem with upgrade cmsms to 1.9.4 version.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 12:14 am
by factor1
got it. im on 1.9.4 now. issues on an old install that upgraded to 1.9.4, and issues on a clean install. each on a different server.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 12:59 am
by jcknight
I also just installed 1.9.4 and have a similar problem where I have a default home page, and a second page(events), but when I goto add more content(another page) it says it was a successfully written to the database but no new pages can be seen in the list.

Any suggestions? oh yea I a unable to access my database directly, because of the isp.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 3:31 am
by jmcgin51
Running 1.9.4 (upgraded from earlier 1.9), and I can create new pages with no problems and they show up in the admin panel and on the front end.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 7:32 pm
by Dr.CSS
To get a good idea of what exactly is happening we need a good description, step by step, of what was done to get to this point, we try to duplicate them to see what the problem is...

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 7:52 pm
by factor1
Basically, Log in, Add new page, submit. CMSms returns the user to the content view, with a success message, but the new content fails to show.

New content is in the DB, and can be accessed via its url.

Thus far the work around is to go to the site settings > advanced and clear the cache.

while that works. Its not a realistic fix to clear the cache ass you add new pages. This was not an issue from v 0.9 through 1.9.1.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 8:56 pm
by uniqu3
@factor1
turn debug mode on in config.php and check for any errors.

Re: Error with “Add New Content”

Posted: Fri Mar 11, 2011 9:42 pm
by factor1
no errors.

did a second install today, and it seems fine thus far.

Re: Error with “Add New Content”

Posted: Sat Mar 12, 2011 12:55 pm
by RonnyK
Could you guys that experience this issue describe IF you are running php5.3 and IF you have the proper timezone set in the config.php.

It might be an issue with a difference between the server-time and the timezone in the config.php... Than the pages will show in some time, when the difference in time is passed....

Ronny