Page 1 of 1

SQL Error when adding News Item

Posted: Fri Feb 23, 2018 12:14 pm
by CapereSpiritum
Hi Folks
I'm getting an SQL error when add a new News item.
Does not happen if editing an old News item.

Have just upgraded from 2.1.6 to 2.2.6
Problem occurred BEFORE upgrade.

DEBUG: SQL = INSERT INTO cms_module_news (news_id, news_category_id, news_title, news_data, summary, status, news_date, start_time, end_time, create_date, modified_date,author_id,news_extra,news_url,searchable) VALUES (9,'1','Test','
asf
','
seaf
','published','2018-02-23 12:03:34',NULL,NULL,'2018-02-23 12:03:44','2018-02-23 12:03:44',1,'','',1)
Duplicate entry '9' for key 'PRIMARY'


CMSMS Version 2.2.6

Installed Modules
AdminSearch 1.0.4
Album 1.11
CGExtensions 1.60
CGSimpleSmarty 2.1.8
CGSmartImage 1.22.2
CMSContentManager 1.1.6
CMSMailer 6.2.14
Captcha 0.5.5
CmsJobManager 0.1.2
CompanyDirectory 1.23.5
DesignManager 1.1.4
FileManager 1.6.5
FilePicker 1.0.2
FormBuilder 0.8.1.6
JQueryTools 1.4.0.3
MenuManager 1.50.3
MicroTiny 2.2.2
ModuleManager 2.1.3
Navigator 1.0.8
News 2.51.3
Search 1.51.3

Re: SQL Error when adding News Item

Posted: Fri Feb 23, 2018 7:45 pm
by rotezecke
Sounds like the (prefix)_module_news_seq table wasnt updated correctly at some point. Find the highest news ID in use, and set the one and only id-field of that table to that ID.