When creating a new Tribune, im getting the following error and cannot proceed:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '30')' at line 1: INSERT INTO {tribune_local} (nid, max_length, nofollow, target, filter_format, users, reload_rate) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, , :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1529 [:db_insert_placeholder_1] => 256 [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => _blank [:db_insert_placeholder_4] => _tribune_standard_filter [:db_insert_placeholder_6] => 30 ) in tribune_local_node_insert() (line 129 of /home/sites/mywebsite/all/modules/tribune/backends/tribune_local/tribune_local.module).

Comments

michaeljoser’s picture

changed line 126 of tribune_local.module from:

'users' => array(),
to
'users' => ''

and that did the trick... not sure if proper way of doing that though

SeeSchloss’s picture

Status: Active » Fixed

Yeah, I didn't test this thoroughly enough I guess... sorry for that. I'm making a bugfix release right now then.

srf’s picture

I did this and also try dev version but I still have problem in saving access page.
The error is
General error: 1366 Incorrect integer value on saving access page: '' for column 'public' at row 1: UPDATE {tribunes} SET nid=:db_update_placeholder_0, type=:db_update_placeholder_1, display_posts=:db_update_placeholder_2, favicon_notification=:db_update_placeholder_3, show_useragent=:db_update_placeholder_4, time_format=:db_update_placeholder_5, mod_access=:db_update_placeholder_6, write_access=:db_update_placeholder_7, read_access=:db_update_placeholder_8, custom_access=:db_update_placeholder_9, bans=:db_update_placeholder_10, public=:db_update_placeholder_11 WHERE (nid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => 26 [:db_update_placeholder_1] => local [:db_update_placeholder_2] => 40 [:db_update_placeholder_3] => 1 [:db_update_placeholder_4] => 0 [:db_update_placeholder_5] => H:i:s [:db_update_placeholder_6] => owner [:db_update_placeholder_7] => nobody [:db_update_placeholder_8] => nobody [:db_update_placeholder_9] => a:0:{} [:db_update_placeholder_10] => N; [:db_update_placeholder_11] => [:db_condition_placeholder_0] => 26 ) in tribune_update() (line 645

SeeSchloss’s picture

Oh, this is the error message corresponding to your problem in #1963826: SQL Error when saving on the Access page.

Well, I don't see how this error you pasted can happen on the dev version since the "public" field is forcibly converted to boolean right before the query... are you sure it was the latest dev ?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.