Skip to Content Skip to Menu

SQL error when saving field in CB 2.0.7

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
9 years 6 months ago #262869 by ThePiston
SQL error when saving field in CB 2.0.7 was created by ThePiston
Trying to save the cb_company field I get this error:

Duplicate column name 'cb_company' SQL=ALTER TABLE `j17_comprofiler` CHANGE `company` `cb_company` varchar(255)

I looked in that table and there is no duplicate cb_company field though

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 6 months ago #262881 by nant
Replied by nant on topic SQL error when saving field in CB 2.0.7

ThePiston wrote: Trying to save the cb_company field I get this error:

Duplicate column name 'cb_company' SQL=ALTER TABLE `j17_comprofiler` CHANGE `company` `cb_company` varchar(255)

I looked in that table and there is no duplicate cb_company field though


Hmm, looks like some of the reserved field ids have been misused.

Kyle will have to give some feedback here on how to fix.

I think you will need to do some database changes for the conflicting ids - but Kyle has chime in.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262915 by krileon
Replied by krileon on topic SQL error when saving field in CB 2.0.7
Our old sample data incorrectly created fields. They didn't include cb_ and they reserved IDs. This is no longer the case with CB 2.x. The new sample data begin with cb_ and don't use any specific ID anymore. You should have no issues migrating this by simply resaving the fields or leaving them as is, but it looks like you ran the sample data which created the new ones that are prefixed with cb_ so you likely have 2 company fields in CB > Field Management. I recommend deleting the new cb_ ones created by the sample data then simply editing then saving your existing sample data fields as needed.


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 or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
9 years 6 months ago - 9 years 6 months ago #262926 by ThePiston
Replied by ThePiston on topic SQL error when saving field in CB 2.0.7
It's possible I used sample data, but that would have been lloooong ago. Didn't CB come with a "company" field in the past as standard?

This site is old though and has come from an old version of both Joomla and CB - has been through multiple migrations and versions.

I'll backup DB and delete those fields in CB

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 9 years 6 months ago by ThePiston.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262943 by krileon
Replied by krileon on topic SQL error when saving field in CB 2.0.7

It's possible I used sample data, but that would have been lloooong ago. Didn't CB come with a "company" field in the past as standard?

Those were generated by CB 1.x sample data tool. I guess it's possible in an extremely old version back to Mambo/Joomla 1.x days it installed them by default, but I don't recall.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum