|Project:||File (Field) Paths|
|Status:||postponed (maintainer needs more info)|
in filefield_paths.module, when it is trying to do retroactive updates, the line
is resulting in bad queries trying to save fields defined by other modules:
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/includes/database.mysqli.inc on line 323.
in my case, it was a Link field. the problem is that the data in $node is not ready for an update, and content_storage('update',$node) (which is what that invoke boils down to) assumes that it is. here, the link attributes were still an array and hadn't been serialized.
the problem is, i am not sure how to fix that without re-breaking #494830: Remove Image Deletes the File Regardless of Other References. i tried boosting the weight of Filefield Paths to 50 and that didn't stop the error. adding another invoke default call for presave:
didn't work either. changing that to
so far seems to have done it, but that is pretty specific to Link and i really have no idea what the side-effects of that might be.
i don't know if you will consider this a bug in Filefield Paths or not, but i wanted to add a report in case other people are hitting a similar problem.