This error message has been diplayed:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'nid' at row 1: INSERT INTO {sgrid} (nid, rank, view_display) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => component_map_page ) in sgrid_view_sgrid_form_submit() (line 73 of /Applications/MAMP/htdocs/map drupal-7.14/sites/all/modules/sgrid/sgrid.module).
Moving elements around works, logged in as admin user #1.
Drupal 7.14
Cheers
Rolf
Comments
Comment #1
Countzero commentedYou probably tried to save without reordering anything first.
It's a known bug : I'll try to commit a fix these days.
Comment #2
jpshayes commentedI am getting the same error. I am reordering before saving
Using Views 7.x-3.3 and the S Grid module released on May 12th.
Comment #3
TimVS commentedI am also getting this error,
after reordering.
Comment #4
TimVS commentedI did some debugging and found the following,
The js needs a this element:
<span class="sgrid-nid">{your nid}</span>When you add it manualy in the view, everythung works, but this isn`t the way to go.
After a littlebit of digging if found that the views_view_row_sgrid_style.tpl.php file isn`t called.
I`m trying to debug this, but i`m new to Drupal so it is hard to find
So maybe anyone else has some sugestions why these file isn`t called?
Tim VS
Comment #5
Countzero commentedWell, sorry guys, I've been very busy these days. Will try to pay this issue some attention ASAP.
Edit : there is indeed something wrong with the template file for the row. Investigating this right now.
Edit 2 : Solved this error but I stumbled on another one, probably related. Not sure the fix will come today.
Comment #6
Countzero commentedShould be solved in latest commit.
Comment #7
stan turyn commentedStill the same error on save.
Comment #8
iaminawe commentedI am also still receiving the same error with the latest dev.
Comment #9
Countzero commentedSorry to ask this, but did you guys cleared your caches, including Views' ?
Comment #10
Countzero commentedCould you tell me if things got better after cache clearing ?
Comment #11
obisean commentedI'm using the latest dev and still get this error after clearing all caches
Comment #12
Countzero commentedSomething I forgot to ask you : did you corrrectly set the Row Style to "Sgrid style" ?
I really mean the ROW style, not the view style. It would explain why the row template is not called, and is a frequent mistake.
Comment #13
obisean commentedSorry for the delayed response I did explicitly set the Sgrid Style row, but I still get this error on save:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'nid' at row 1: INSERT INTO {sgrid} (nid, rank, view_display) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => yarn_color_cards_admin_page ) in sgrid_view_sgrid_form_submit() (line 73 of /mnt/www/html/pycdev/docroot/sites/all/modules/sgrid/sgrid.module).
Comment #14
obisean commentedI just realized this might be because this is a view of commerce products. Could that possibly be the issue? The grid sort criteria is not showing up at all in this view. However, it appears in regular content views.
Comment #15
Countzero commentedYes, it's probably the issue.
Explanation : Commerce is heavily Entity based, and Sgrid assumes too much about the content being nodes.
Entities have entity ids, nodes have nids. Bottomline : Sgrid should adapt its behaviour depending on what kind of objects are managed by the view.
I'm working on heavy code changes these days. I'll try to correct this behaviour also.
Thanks for your feedback and puting me on the right track.
Comment #16
obisean commentedThanks for all your hardwork, this is an amazing module. Borrowing heavily from draggableviews hook_views_data_alter implementation, I managed to get this module working with all entities (commerce products included). I'll submit a patch this evening if you would like. I'm very new to drupal (only a couple weeks in) so you may need to tidy up the code a bit.
Comment #17
Countzero commentedSorry : I forgot to update this issue. I commited something this morning (european time) which could solve the problem. Would you be kind enough to test it ?
And BTW, thanks for your interest. I'll review your patch with pleasure.
Comment #18
obisean commentedI tried out your most recent commit. Unfortunately, it still did not work with the commerce product view. However sortable grids does seem to work with commerce product views using the attached patch; which associates all entity types with the sortable grid. Again, I'm very new to Drupal so this may not be the best way, but it works for me. Thanks again for the great module
Comment #19
i-dont-use-this-account commented#12 fixed my issue. Didn't even know there was a row style.
I noticed all the ids of sgrid_item_ weren't receiving values.