When Cloning some types of Node Limit restriction rules, an SQL error is displayed. Despite the error, a new record is created but it is not a true clone - the fields other than Description are default. See attached example.

Error messages similar to the following (some of the values may vary):
PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {node_limit_role} (lid, rid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1_rid, :db_insert_placeholder_1_name); Array ( [:db_insert_placeholder_0] => 2 [:db_insert_placeholder_1_rid] => 1 [:db_insert_placeholder_1_name] => anonymous user ) in node_limit_role_node_limit_save() (line 114 of /home/xdrcft91/public_html/foo/sites/all/modules/node_limit/node_limit_role/node_limit_role.module).

The website encountered an unexpected error. Please try again later

CommentFileSizeAuthor
SQL Error on Cloning Node Limit.jpg353.45 KBdougsap

Comments

duaelfr’s picture

Status: Active » Needs work
Refineo’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.0-alpha5
Priority: Minor » Normal

I also got this error in the latest 7.x-1.x-alpha5 for node_limit_userofrole.

PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {node_limit_userofrole} (lid, rid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1_rid, :db_insert_placeholder_1_name); Array ( [:db_insert_placeholder_0] => 5 [:db_insert_placeholder_1_rid] => 5 [:db_insert_placeholder_1_name] => organizer free ) in node_limit_userofrole_node_limit_save() (line 105 of /***/node_limit/node_limit_userofrole/node_limit_userofrole.module).
HFlame7’s picture

I am also getting this error when trying to make a clone of a limit rule. Using 7.x-1.0-alpha5.
The settings are nearly the same as those in the screenshot, only the content type is different on my end.

duaelfr’s picture

Priority: Normal » Major
Status: Needs work » Needs review

I just had a few minutes to fix this.
It will be deployed with the next dev release.

Jorrit’s picture

Status: Needs review » Fixed

Thanks for fixing it, the fix works fine (marking it as fixed because of that).

Is there any chance a new release can be made? After all, it is still alpha and there hasn't been an alpha release since Februari.

Status: Fixed » Closed (fixed)

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

HFlame7’s picture

Status: Closed (fixed) » Active
duaelfr’s picture

HFlame7 you will have to explain this...

HFlame7’s picture

Status: Active » Closed (fixed)

Sorry about that, I overlooked response #4 (fixed in the dev version) and only saw that the system automatically marked it as fixed.

Changing back to fixed.

Thanks for your work on this module DuaelFr!