Negative weight not saved.
bkoether - July 22, 2009 - 20:58
| Project: | Links Package |
| Version: | 6.x-1.2 |
| Component: | Code: links_related.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | syscrusher |
| Status: | active |
Jump to:
Description
I have the problem that when I want to reorder links it seems that a negative value in the weight field is not saved.
When I set a link to '-5', save the node, edit the node again, this link is set to '0'.
Positive values work fine.
Ben

#1
I'm getting the same problem and the links are not saved when the weight is negative
# user warning: Out of range value for column 'weight' at row 1 query: UPDATE links_node SET link_title='', weight=-4 WHERE lid=1 AND nid=82 AND module='links_related' in C:\Domains\example.com\wwwroot\drupal\sites\all\modules\links\links.inc on line 1131.# Unable to update link "Welsh Assembly Government | Contract Award : Delivery of Farming Connect Programme ..." in database.
# user warning: Out of range value for column 'weight' at row 1 query: UPDATE links_node SET link_title='', weight=-3 WHERE lid=2 AND nid=82 AND module='links_related' in C:\Domains\example.com\wwwroot\drupal\sites\all\modules\links\links.inc on line 1131.
# Unable to update link "Welsh Assembly Government | Frequently asked questions" in database
believe the issue is in the install line 106
'weight' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size'=>'tiny'),Aren't tiny integers a single byte and therefore positive only?
#2
Sorry you are seeing this error. I think you're right about the unsigned value in the install file. I'll look at this.
Kind regards,
Syscrusher