SQLSTATE[42000] error when saving block
Permalink Browser Info Environment
Hi, after having created a basic pipeline block with a repeatable, 3 text fields and 3 select lists, I get the following errors when trying to add a repeatable entry:
An exception occurred while executing 'INSERT INTO btPipelineBasicProductEntries (sortOrder, name, condition, description_1, category, phase, progress, bID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "ar", "arg", "aerg<\/p>", "immuno", "preclinical", "25", "297"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition, description_1, category, phase, progress, bID) VALUES ('1', 'ar', 'ar' at line 1
I should note that I haven't amended the block since creating it in anyway, and I have set read/write permissions on blocks/files/packages/config
An exception occurred while executing 'INSERT INTO btPipelineBasicProductEntries (sortOrder, name, condition, description_1, category, phase, progress, bID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [1, "ar", "arg", "aerg<\/p>", "immuno", "preclinical", "25", "297"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition, description_1, category, phase, progress, bID) VALUES ('1', 'ar', 'ar' at line 1
I should note that I haven't amended the block since creating it in anyway, and I have set read/write permissions on blocks/files/packages/config
Type: | Discussion |
---|---|
Status: | Resolved |
Ah nice, that fixed it, thank you. So is it that I'm using sql reserved words? I'm going to add back ticks to the necessary file(s) - do you think this a change you'd add in the future or can you think of an alternative solution?
Hi again,
I've already added quite a lot of reserved (SQL) words. Unfortunately, it seems not all of them are included. I will be including this one in a future update too, so you don't have to worry about this one anymore. It could be that there are still others left, but if people just keep making support tickets for that, I can keep fixing them! :)
Kind regards,
Ramon
I've already added quite a lot of reserved (SQL) words. Unfortunately, it seems not all of them are included. I will be including this one in a future update too, so you don't have to worry about this one anymore. It could be that there are still others left, but if people just keep making support tickets for that, I can keep fixing them! :)
Kind regards,
Ramon
Awesome thanks for the help and rapid response as always :)
Hi there,
This is fixed now in version 2.5.2. Let me know if you have any more non-working labels!
Kind regards,
Ramon
This is fixed now in version 2.5.2. Let me know if you have any more non-working labels!
Kind regards,
Ramon
OK, not entirely sure here, but I'm guessing this is correct.
First uninstall the block type. Then go to the Block Designer dashboard page. Go to "Config" and load the block back in. Now go to the "condition" field you made. Rename condition to "conditionn" or "conditionA", as I think the database thinks it's something else (not a column). Then follow the steps of the first question over here:
http://www.concrete5.org/marketplace/addons/block-designer/question...
(I'm entering data in a field, but the field does not save/remains empty in the form. What do I do?)
On the same page is also explained how to uninstall a block type if you are unsure.
This will rename the "condition" database column too for your block type. Let me know if you have any more questions!
Kind regards,
Ramon