Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

sql error on insertion in comprofile table

  • blussan
  • blussan
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 4 months ago #207273 by blussan
Hi,

I have a sql error on insertion in comprofile table :

moscomprofiler::storeNew failed: Unknown column 'cb_1ass' in 'field list' SQL=INSERT INTO `uaumx_comprofiler` (`id`,`user_id`,`firstname`,`lastname`,`approved`,`confirmed`,`registeripaddr`,`cb_1civilite`,`cb_1prenom`,`cb_1nom`,`cb_1ass`,`cb_2civilite`,`cb_2prenom`,`cb_2nom`,`cb_2ass`,`cb_3civilite`,`cb_3prenom`,`cb_3nom`,`cb_3ass`,`cb_civilite`,`cb_rue`,`cb_rue2`,`cb_codepostal`,`cb_ville`,`cb_telephone1`,`cb_telephone2`,`cb_boxeleve1`,`cb_boxeleve2`,`cb_boxeleve3`) VALUES ('524','524','01','Test','1','0','80.15.127.245','','','','','','','','','','','','','M.','1 rue Alexandre Dumas','Complément test01','78470','Saint Rémy lès Chevreuse','0610618579','','0','0','0')

After several tests, I found that conditionnal delimiter fields (cb_ass1, cb_ass2, cb_ass3) when they are not displayed are included in the sql insertion query. The field cb_boxeleve1 (checkbox) control if cb_ass1 is displayed or not. When fields, cb_boxeleve1, cb_boxeleve2 and cb_boxeleve3 are checked, cb_ass1, cb_ass2, cb_ass3 are displayed and are not included in the sql query and insertion goes well.

PHP 5.2.17
Joomla 2.5.6
CB 1.8.1
CBSubs 2.0.2

Ps: Your link to "Help US Help You" is broken in your Topic "Read first Please"

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
12 years 4 months ago #207282 by krileon
Normally this happens when a column has been added to _users (but thought we fixed this with 1.8.1?). Please check if those columns are in _users database table and if they are please remove them.

Is this happening on frontend? Backend? or both? If I understand correctly those fields are conditioned? How? With CB Conditional? If so does disabling the CB Conditional plugin resolve the issue? What version of CB Conditional?

Ps: Your link to "Help US Help You" is broken in your Topic "Read first Please"

Thank you, fixed.


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.

  • blussan
  • blussan
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 4 months ago - 12 years 4 months ago #207411 by blussan

Normally this happens when a column has been added to _users (but thought we fixed this with 1.8.1?). Please check if those columns are in _users database table and if they are please remove them.

Those columns are not in _users database table.

Is this happening on frontend? Backend? or both?

I have tested in frontend.

If I understand correctly those fields are conditioned? How? With CB Conditional? If so does disabling the CB Conditional plugin resolve the issue? What version of CB Conditional

I am using CB Conditional 1.8.2.
It is not necessary to disable the plugin, just disable the condition that hide the field delimiter.
I have the same problem with the UPDATE query of _comprofiler table.

It is very easy to replicate, you create a field separator, you create a checkbox with a "Field conditionnal other". See attached file. When the line is hidden, the field name is in the sql query, when you check the checkbox the line is displayed and the sql query is ok without the field name in the query.
Attachments:
Last edit: 12 years 4 months ago by blussan. Reason: File attached

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
12 years 4 months ago - 12 years 4 months ago #207453 by krileon
That conditional is not valid. You can't "condition others" with a delimiter field as it has no value, no input. Regardless I couldn't confirm your issue. Delimiter fields shouldn't be passed for storage as they have no column in _comprofiler. Do the delimiter fields contents contain an Input by any chance? Is there any further information below the error? Generally a callstack is below it to describe where the error came from.


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.
Last edit: 12 years 4 months ago by krileon.

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

  • blussan
  • blussan
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 4 months ago - 12 years 4 months ago #207480 by blussan

That conditional is not valid. You can't "condition others" with a delimiter field as it has no value, no input.


1 - If you said that because I used "condition others" on delimiter field, it's not true. The "condition others" is on checkbox field and delimiter field is selected in the combobox list "Show".
2 - If you said that I should not select the "field delimiter" in the combobox list "Show" of "other conditions" of the checkbox field. Did you say that it is impossible to conditionally show or hide a delimiter field ? In that case why the delimiter fields are in the combobox list ?

Delimiter fields should be passed for storage as they have no column in _comprofiler. Do the delimiter fields contents contain an Input by any chance?

I'm sorry but I do not understand.
For me, delimiter fields are not in the database. It should never be in the sql query. Are you agree with that ?

Do the delimiter fields contents contain an Input by any chance? Is there any further information below the error? Generally a callstack is below it to describe where the error came from.

The call stack with the sql query of the example on the file attached of my last post :
JDatabaseMySQL::query: 1054 - Unknown column 'cb_line' in 'field list' SQL=INSERT INTO `uaumx_comprofiler` (`id`,`user_id`,`firstname`,`lastname`,`approved`,`confirmed`,`registeripaddr`,`cb_line`,`cb_civilite`,`cb_showline`) VALUES ('525','525','Bruno','Lussan','1','0','127.0.0.1','','M.','0')

1 - JSite->dispatch() C<span>:</span><span>\</span>xampp\www\joomla1\index.php:42
2 - JComponentHelper::renderComponent() C<span>:</span><span>\</span>xampp\www\joomla1\includes\application.php:197
3 - JComponentHelper::executeComponent() C<span>:</span><span>\</span>xampp\www\joomla1\libraries\joomla\application\component\helper.php:351
4 - require_once() C<span>:</span><span>\</span>xampp\www\joomla1\libraries\joomla\application\component\helper.php:383
5 - saveRegistration() C<span>:</span><span>\</span>xampp\www\joomla1\components\com_comprofiler\comprofiler.php:133
6 - moscomprofilerUser->saveSafely() C<span>:</span><span>\</span>xampp\www\joomla1\components\com_comprofiler\comprofiler.php:1040
7 - moscomprofilerUser->store() C<span>:</span><span>\</span>xampp\www\joomla1\administrator\components\com_comprofiler\library\cb\cb.tables.php:1639
8 - moscomprofiler->storeNew() C<span>:</span><span>\</span>xampp\www\joomla1\administrator\components\com_comprofiler\library\cb\cb.tables.php:1229
9 - CBdatabase->insertObject() C<span>:</span><span>\</span>xampp\www\joomla1\administrator\components\com_comprofiler\library\cb\cb.tables.php:513
10 - JDatabase->insertObject() C<span>:</span><span>\</span>xampp\www\joomla1\administrator\components\com_comprofiler\library\cb\cb.database.php:920
11 - JDatabaseMySQL->execute() C<span>:</span><span>\</span>xampp\www\joomla1\libraries\joomla\database\database.php:841
12 - JError::raiseError() C<span>:</span><span>\</span>xampp\www\joomla1\libraries\joomla\database\database\mysql.php:548
13 - JError::raise() C<span>:</span><span>\</span>xampp\www\joomla1\libraries\joomla\error\error.php:251

I just need to conditionally hide or show a delimiter field in register form or profil for example. How can I do that ?
Last edit: 12 years 4 months ago by blussan. Reason: Add SQL Query

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
12 years 4 months ago #207493 by krileon

1 - If you said that because I used "condition others" on delimiter field, it's not true. The "condition others" is on checkbox field and delimiter field is selected in the combobox list "Show".
2 - If you said that I should not select the "field delimiter" in the combobox list "Show" of "other conditions" of the checkbox field. Did you say that it is impossible to conditionally show or hide a delimiter field ? In that case why the delimiter fields are in the combobox list ?

You can't put a condition on delimiter fields at all. It won't do anything. Delimiter fields have no field value. You can show/hide delimiter fields from another field, but you can't show/hide other fields from a delimiter field.

I'm sorry but I do not understand.
For me, delimiter fields are not in the database. It should never be in the sql query. Are you agree with that ?

Was a typo, meant "shouldn't". Delimiter fields don't store to database.

The call stack with the sql query of the example on the file attached of my last post :

Error doesn't seam to be coming from CB Conditional. I'm not sure why it's trying to pass a delimiter field to database. I could in no way duplicate this. It looks like you're adding an Input to your delimiter field and it's called "cb_line". You can't do this. Any HTML Inputs present will submit with the form.

I just need to conditionally hide or show a delimiter field in register form or profil for example. How can I do that ?

You need to use "Conditional Self" or configure from another field like a checkbox to show/hide the delimiter with "Conditional Other"


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