I enabled the weight for two node types, article and a custom one.

When I tried to disable it (for the custom node or for the article) I received this error:

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 ')' at line 1: UPDATE {node} SET sticky = 0 WHERE sticky < 0 AND type IN (); Array ( [article] => article ) en weight_disable() (línea 152 de D:\xampp\htdocs\drupal\sites\all\modules\weight\weight.admin.inc).

The sticky fields in the database for those nodes kept the weight value (-100).

When I uninstall the module those values turn back to sticky values (0).

I'm using XAMPP 1.7.4 under Windows 7:
Apache/2.2.17 (Win32)
PHP/5.3.4
mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
extensión PHP: mysql

Comments

davisben’s picture

Status: Active » Fixed

This has been fixed and committed.

Anonymous’s picture

Thank you, this bug is fixed.

Although the module still doesn't work...
I just reported the next bug: http://drupal.org/node/1272418

Status: Fixed » Closed (fixed)

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