Closed (works as designed)
Project:
Sortable Grid Views Plugin
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Reporter:
Created:
2 May 2011 at 07:54 UTC
Updated:
20 May 2012 at 15:44 UTC
I can setup the module just fine but when I clicked on [save order] it shows a database error. I wonder where it went wrong http://screencast.com/t/ZTcXnP7ZX
Comments
Comment #1
Countzero commentedThere was a bug in an earlier release where the order wasn't set if you didn't change the initial state.
Did you try moving a node, then save ? Do you get the same error in that case ?
Comment #2
Countzero commentedOK the bug was indeed present in the D7 version. I have corrected it in the D6 version, but it was not done in the D7 one.
I just comitted a fix which should become available in the 7.x-1.x-dev version as soon as the d.o scripts will have done their job.
Comment #3
Countzero commentedThe new version is available for download on the project page.
Updating issue to critical.
Please review.
Comment #4
Countzero commentedComment #5
priapurnama commentedAwesome, I'm checking it out right now and will post the result right away
Comment #6
priapurnama commentedThe same error is still there, plus on the view page this error came up: Error message
Strict warning: Only variables should be passed by reference in sgrid_views_pre_render() (line 72 of /var/www/xxx/sites/all/modules/sgrid/sgrid.views.inc).
Is there anything I can do to help find where the problem is?
Comment #7
priapurnama commentedI just tried reinstalling and rebuilding the view, sorting now works but this error is still there: Error message
Strict warning: Only variables should be passed by reference in sgrid_views_pre_render() (line 72 of /var/www/xxx/sites/all/modules/sgrid/sgrid.views.inc).
Comment #8
Countzero commentedI augmented the error reporting strictness of my dev server, and got the message.
It's a well known bug on d.o because modules aren't supposed to be compatible with E_STRICT error reporting, but some servers are configured that way.
Nevertheless, I commited a fix just a few minutes ago, which, as usual, should appear as a new version later on on the project page.
Please update when you can confirm it's fixed.
Comment #9
priapurnama commentedLatest update got rid of the bug, great work Countzero!
Comment #10
Countzero commentedThanks for your feedback. Closing.
Comment #11
bmango commentedI've just downloaded and installed the 7.x version of the module and I'm getting the same database error as Priapurnama. It happens when I click on the "save order" button.
Comment #12
EoinPaganus commentedI've just experienced the same error using the latest D7 dev download, but I'm getting it if I change the order as well.
Everything was working perfectly so I moved onto a second sortable view and bang SQL Error :-(
Comment #13
EoinPaganus commentedI've managed to get it working all the time by deleting the nid row in the database and re-creating it as just a varchar.
It's a dirty fix but one that works.
I did notice under the database option that you have auto increment on the nid but then inserting values, just a heads up as the auto increment could probably be dropped.
Great module working a treat now :-)
Comment #14
EoinPaganus commentedComment #15
Countzero commentedI can't believe I let this pass ... Thanks a lot, it's excellent feedback.
Modification commited to 6 and 7 branches. Reviews welcome as soon as the releases we'll be updated by d.o scripts.
I'm glad you enjoy the module.
Comment #16
findorf commentedI too get this error:
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] => board_page ) in sgrid_view_sgrid_form_submit() (line 64 of C:\wamp\www\drupal7\sites\all\modules\sgrid\sgrid.module).
Looks like placeholder_0 is empty ?
I'm using Drupal 7.2, MySQL 5.1.36-community-log
jQuery Update 7.x-2.2
Sortable Grid 7.x-1.x-dev
Chaos tools 7.x-1.0-alpha4
Comment #17
yanivtalmusic commentedI can't view the database error but I'm having a similar problem with Drupal 6. When I hit "Save order" the arrangement reverts to the default layout instead of saving the changes.
This module is very close to providing great and simple to implement functionality. Thank you.
Comment #18
bmango commentedI downloaded the latest version of this module but I'm still getting the same error when I click "save order". The error is:
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] => photos_page ) in sgrid_view_sgrid_form_submit() (line 64 of /path/sites/all/modules/sgrid/sgrid.module).
I'm using Drupal 7.0
Chaos tool suite 7.x-1.0-alpha4
jquery_update 7.x-2.2
sgrid 7.x-1.x-dev (2011-May-27)
Comment #19
Countzero commentedMay I ask which Views version the people who get the db error use ? Is this 2.x or 3.x ?
Comment #20
Countzero commentedComment #21
bmango commentedI'm using Views 7.x-3.0-beta3
Comment #22
Countzero commentedOK, so this means I have work to do. Don't know when though, my planning is more than full.
Comment #23
Countzero commentedI tested again on a fresh environment with D7.2 and Views-3.x-beta3, and everything went fine.
The only clue I can give is this error comes up if you don't correctly set the row style in your view to 'Sortable Grid' as stated on the project page.
Same goes for D6 version with Views-3.x-dev, including the order being reset to default on save.
Can you confirm your setup is right and you followed closely the intructions on http://drupal.org/project/sgrid ?
Comment #24
bmango commentedVery sorry, Countzero, it was my mistake. As you suggested I hadn't set the row style to 'Sortable Grid' in the Fields Format section. I wasn't sure where the row style was and it took me a while to find it. Hopefully my mistake may help others.
Comment #25
Countzero commentedNever mind, I prefer this to some nasty bug in my code.
Closing.
Comment #26
batusy commentedWith the version 7.x-1.x-dev and follow steps http://drupal.org/project/sgrid works perfectly ;))
Very good job Countzero !!!!