[SOLVED] Getting SQL error after upgrade to CB 1.9

11 years 2 months ago - 11 years 2 months ago #221579 by WebJIVE
I just upgraded CB on a big site for a client to prepare for CBSUBS installation and when I try to register as a new user, we get the following error:

moscomprofiler::storeNew failed: Duplicate entry '30486' for key 'PRIMARY' SQL=INSERT INTO `tqyap_comprofiler` (`id`,`user_id`,`firstname`,`lastname`,`approved`,`confirmed`,`registeripaddr`,`cb_country`,`cb_country_desc`,`cb_state`,`cb_doctorbased`,`cb_profession`,`cb_doctorspcialty`) VALUES ('30486','30486','Eric','Caldwell','1','1','99.19.78.156','US','United States','AR','Office Based','MD or DO','Urology')

I tried the usual CB Tools sync and repairs but, no luck. The user is registered but, the page reloads and shows the SQL instead of the normal next step.

BTW, your support ticket system is broken. You get an internal server error when submitting a ticket with the information you would need to login to our system.

Eric Caldwell
Web-JIVE.com

Please Log in to join the conversation.

11 years 2 months ago #221641 by WebJIVE
Replied by WebJIVE on topic Getting SQL error after upgrade to CB 1.9
Ok, I had to hire a developer to look into this over the weekend and they did the following:

updated following file
/administrator/components/com_comprofiler/library/cb/cb.tables.php

Added following lines after line #2453

$db = JFactory::getDBO();
$db->setQuery("DELETE FROM #__comprofiler WHERE user_id = '".$this->_cmsUser->id."'");
$db->Query();

Why would this be necessary?

Thanks

Eric Caldwell
Web-JIVE.com

Please Log in to join the conversation.

11 years 2 months ago #221644 by krileon
Replied by krileon on topic Getting SQL error after upgrade to CB 1.9
Looks like your auto increment has went out of sync. Check within _users and increment the auto increment by 1 (if off by more than 1 then increment further). In _comprofiler the ID and User ID columns should be the same and both be the same value as the ID column in _users so they should all be incremented properly. If for whatever reason _users ID column is auto incremented behind the IDs in _comprofiler you'll get this error.

BTW, your support ticket system is broken. You get an internal server error when submitting a ticket with the information you would need to login to our system.

It's not broken. We reject certain content that could trigger a security problem. Don't include raw code, just attach a screenshot of an error instead.

Why would this be necessary?

It's not, remove that code; you need to fix your database.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 2 months ago #221783 by WebJIVE
Replied by WebJIVE on topic Getting SQL error after upgrade to CB 1.9
Just tried your suggestion and no-go. Same error message with an incremented number. I made sure that both the _users and were all set to increment to the next number and they were, and did, even properly created the user but then put up that SQL error message.

Thoughts?

As for the ticket. I can pull the code out since its in the forums now. We run WHMCS too but, don't have that set to block code.

Should I open a ticket?

Eric Caldwell
Web-JIVE.com

Please Log in to join the conversation.

11 years 2 months ago #221807 by krileon
Replied by krileon on topic Getting SQL error after upgrade to CB 1.9
Please PM backend super administrator login credentials as well as phpmyadmin login credentials and will take a look.

Should I open a ticket?

No, you're already receiving support.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 2 months ago #221898 by WebJIVE
Just to give everyone an update. What was causing this was the OSE Membership addon. There is a setting in the OSE User V5 plugin where you can set to create CB profile. If that is checked, this will cause this problem. Thanks to the CB team for helping us solve this.

Eric Caldwell
Web-JIVE.com
The following user(s) said Thank You: nant, krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.243 seconds

Facebook Twitter LinkedIn