Please see http://drupal.org/node/268891#comment-3383660 for reproduction scenario. This relates to "parameter 1" warnings such as:
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in includes/database.mysql.inc on line 321.
I added some notes in: http://drupal.org/node/268891#comment-3514936
Is the solution indeed to replace the content_update call with one to node_save? It does appear as if calling content_update directly is not resulting in all of the preparation that is needed being done (i.e., serializing some arrays that need to be stored as strings).
Thank you!
Comment | File | Size | Author |
---|---|---|---|
#12 | cnr-928042.patch | 477 bytes | jonskulski |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedSame issue here!
Comment #2
domidc CreditAttribution: domidc commentedI believe the error is related to other fields than the nodereference instance. It will probably be caused by module not using the content api properly. Which other modules do you have enabled?
Comment #3
sachbearbeiter CreditAttribution: sachbearbeiter commentedi get this - and i have no overview at this point ...
* warning: mysql_real_escape_string() expects parameter 1 to be string, array given in database.mysql.inc on line 321.
* warning: Invalid argument supplied for foreach() in corresponding_node_references.crud.inc on line 107.
* warning: mysql_real_escape_string() expects parameter 1 to be string, array given in database.mysql.inc on line 321.
Comment #4
domidc CreditAttribution: domidc commentedStill using version 6.3.3? This issue might be fixed in 6.4.1. Can you confirm?
Comment #5
sachbearbeiter CreditAttribution: sachbearbeiter commentedi did a fresh install -> but there is still the message
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in database.mysql.inc on line 321.
but i had the following situation:
added in the 6.3.3 4 references to a node.
the editor changed later 3 of them to "unpublished" with vbo
testing the new install i wanted to save the node, but it was not allowed anymore (CNR?)
i deleted the 3 references and was able to save -> after this i got the message 3 times ...
coincidence?
i don't know if this explanation helps you -> but i keep tabs on it ...
Comment #6
domidc CreditAttribution: domidc commentedA yes. When using the new version of cnr the allowed amount of references is handled by cck. This means you have to set the allowed amount of references on the cck node ref instance. Settings to unlimited like before is not needed anymore.
Enable your error reporting and you ll see that when you try to overload a node with more allowed reference you get a warning. Perhaps I should make this a warning in stead of an error?
I cant reporduce the other error. I ll try tonight with vbo installed. Perhaps there goes something wrong there?
Comment #7
domidc CreditAttribution: domidc commentedForget to ask. Can you confirm that overloading was the problem why you couldnt save your nodes?
Does the functionality fail because of the database error? Is everything still working?
Comment #8
domidc CreditAttribution: domidc commentedMaybe this is causing the problem http://drupal.org/node/268891#comment-3383660
Comment #9
domidc CreditAttribution: domidc commentedThis one #978814: warning: mysqli_real_escape_string() expects parameter 2 to be string, array given ... database.mysqli.inc on line 323 is marked as a duplicate but may contain some useful info on this issue. Please continue to post in this issue.
Comment #10
tiyberius CreditAttribution: tiyberius commentedHas there been any progress on this? Are people just not using the Link module in combination with CNR? What are some other options?
Comment #11
czigor CreditAttribution: czigor commentedIt very much seems to me that this is either a Link or CCK issue. Marking this as duplicate of #268891: mysqli_real_escape_string() expects parameter 2 to be string, array given in /includes/database.mysqli.inc on line 323. Please continue to post there.
Comment #12
jonskulski CreditAttribution: jonskulski commented@tiyberius
Either use the patch I'll attach or see #268891 for a patch to link.module
@czigor
CNR does cause this error by invoking content_update() directly. Other modules can do it too (which is why I suggested to link.module that they use a fix someone provided), so the issue is larger than just CNR.
However, invoking content_update() is questionable imo. Do you have a reason to use content_update() directly? Do you know if this is something that cck had in mind?
Attaching a patch that uses node_save() instead. Let me know what you think.
All this being said, I posted in the thread #268891 suggesting that they make sure the proper _link_process() function is called. (This is the function that serializes the array so it can be saved).
Thanks!
Comment #13
jonskulski CreditAttribution: jonskulski commentedoops, forgot to reopen.