Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 6.26
Revisioning 6.x-3.15
Link 6.x-2.9
I have enabled revisoning for a node type - let's call it "Profile". Node also has field cck link field for storing web urls.
WHen you try to "Publish this" revision - mysql error happens:
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in C:\WEB\drupal6\includes\database.mysql.inc
If I leave the Link field empty - then error does not happen.
I tried to figure out the problem and it seams to be with the "attributes" property of the Link field. It is empty array at the point of saving and this is why the mysql error happenes.
Probably it should be serialized at the point of saving the node revision?
Comment | File | Size | Author |
---|---|---|---|
#1 | link-nodeapi_update_fix-1637434.patch | 349 bytes | Nor4a |
Comments
Comment #1
Nor4a CreditAttribution: Nor4a commentedHere comes the patch - seams to fix the issue.
Comment #2
pokermoneyclips CreditAttribution: pokermoneyclips commentedI noticed that the code from the patch
case 'update':
was included in the latest link 6.x-2.10 update from this post - https://drupal.org/node/268891
Different error message, but same patched code.