Upgraded FEU - Duplicate entry '0' for key 'PRIMARY'

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
tristan
Dev Team Member
Dev Team Member
Posts: 374
Joined: Tue May 02, 2006 10:58 am
Location: The Netherlands

Upgraded FEU - Duplicate entry '0' for key 'PRIMARY'

Post by tristan »

Hi there,

having the exact same problem as this post:

Selfregistration fout Duplicate entry '0' for key 'PRIMARY'

Which was solved by re-install and start from scratch. In my case that's a bit more difficult since the FEU users are also bloggers in the system and they also send each other personal messages so I'd rather fix the DB error behind this error.

I suspect things went wrong for the exact same reason as the post mentioned earlier. Updated from CMS Made Simple 1.12 to 2 without having the latest version of the FEU module. I knew this was wrong but I did it anyway since upgrading the FEU module in 1.12 failed.

Is there anything I can do to fix a
Duplicate entry '0' for key 'PRIMARY'
error when creating a new FEU user? Everything else works as expected. Last cms_module_feusers_users id field number is also lower than the cms_module_feusers_users_seq id. Just like the original post actually.

Anyone here who is willing to help me with this? Any help at all is greatly appreciated, of course willing to share any extra DB info on specific tables if that would give more clues on where I could start to look.

----------------------------------------------
Cms Version: 2.2.3.1
Installed Modules:
AdminSearch: 1.0.4
CGBlog: 1.14.4
CGContentUtils: 2.2.2
CGExtensions: 1.56.2
CGFeedback: 2.0.2
CGSimpleSmarty: 2.1.6
CGSmartImage: 1.21.12
CGTweet: 1.2
CGUserDirectory: 1.5.1
CMSContentManager: 1.1.6
CMSMailer: 6.2.14
Captcha: 0.5.5
CmsJobManager: 0.1.1
CustomContent: 1.10
DesignManager: 1.1.3
FEU_PMs: 1.0.0
FileManager: 1.6.4
FilePicker: 1.0.1
FormBuilder: 0.8.1.6
FrontEndUsers: 2.5.2
JQueryTools: 1.4.0.3
MenuManager: 1.50.3
MicroTiny: 2.2.1
ModuleManager: 2.1.2
Navigator: 1.0.8
News: 2.51.3
Search: 1.51.2
SelfRegistration: 1.10.1
Showtime2: 3.5.4
SimpleSiteInfo: 3.3
ThemeManager: 1.1.8

Config Information:
php_memory_limit:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/Amsterdam
permissive_smarty: true

Php Information:
phpversion: 7.0.23
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22527
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: 512M
max_execution_time: 120
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
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: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache/2
Server Api: apache2handler
Server Os: Linux 3.2.0-4-amd64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.6.12
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:
tmp: /home/user/domains/userdomain/public_html/tmp (0755)
tmp_cache: /home/user/domains/userdomain/public_html/tmp/cache (0777)
templates_c: /home/user/domains/userdomain/public_html/tmp/templates_c (0777)
modules: /home/user/domains/userdomain/public_html/modules (0755)
uploads: /home/user/domains/userdomain/public_html/uploads (0755)
File Creation Mask (umask): /home/user/domains/userdomain/public_html/tmp/cache (0777)
config_file: 0444
----------------------------------------------
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Upgraded FEU - Duplicate entry '0' for key 'PRIMARY'

Post by calguy1000 »

this means that there is already an ID of 0 in a primary key for one of the tables, and you are trying to create another one. Hint: an ID Of 0 is invalid.

This probably means that there was an error in your database tables BEFORE the upgrade, and then the upgrade failed because of it.

You will have to restore your backup, and check the various database feu database tables (particularly the users table) for wonky values. and try again. I would also enable debug mode, debug to log, and watch the error log on upgrade.
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.
tristan
Dev Team Member
Dev Team Member
Posts: 374
Joined: Tue May 02, 2006 10:58 am
Location: The Netherlands

Re: Upgraded FEU - Duplicate entry '0' for key 'PRIMARY'

Post by tristan »

Thanks for the reply!

Went back to the beginning of time again, 1.12.2 with FEU 1.28 and updated FEU first now to 1.31.3. This removed the cms_module_feusers_users_seq table and it looks like the cms_module_feusers_users has a more "modern" structure now with auto incrementing ID field.

Now going to try to move those table to the 2.2 instance. Thanks for thinking along.
tristan
Dev Team Member
Dev Team Member
Posts: 374
Joined: Tue May 02, 2006 10:58 am
Location: The Netherlands

Re: Upgraded FEU - Duplicate entry '0' for key 'PRIMARY'

Post by tristan »

Oh now I remember why I didn't upgrade all the modules before the big update to 2.x:

Code: Select all

Cannot find the required module "FrontEndUsers" (version 2.2.0.5 or later) in the repository. It is directly required by SelfRegistration version 1.10; this could indicate a problem with the version of this module in the repository. Please contact the module's author. Aborting.
When trying to upgrade SelfRegistration to 1.10 from 1.8.3. Oh well, the trick to move over the tables of just the upgraded FEU seems to be working.
Locked

Return to “Modules/Add-Ons”