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

Type: Discussion
Status: Resolved
View Replies:
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

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
BrendanLawton replied on at Permalink Reply
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?
ramonleenders replied on at Permalink Reply
ramonleenders
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
BrendanLawton replied on at Permalink Reply
Awesome thanks for the help and rapid response as always :)
ramonleenders replied on at Permalink Reply
ramonleenders
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

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.5.8
Version Installed - 5.7.5.7
Database Version - 20160412000000

# concrete5 Packages
Block Designer (1.3.12), Block Designer Pro (1.1.8), Database Migration (0.9.3), ExchangeCore Dev Tools (1.0.1).

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.17 OpenSSL/1.0.1f

# Server API
apache2handler

# PHP Version
5.5.9-1ubuntu4.17

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 10M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.