in filefield_paths.module, when it is trying to do retroactive updates, the line
_content_field_invoke_default('update', $node);
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:
_content_field_invoke_default('presave', $node);
didn't work either. changing that to
content_presave($node);
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.
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen shot 2012-08-13 at 5.02.12 PM.png | 61.06 KB | renaissanceboy |
#5 | 940156-5.patch | 487 bytes | rjbrown99 |
Comments
Comment #1
JordanMagnuson CreditAttribution: JordanMagnuson commentedI'm experiencing the same issue. The retroactive updates still seem to be working though... does this break any real functionality, or just cause the error messages to show?
Comment #2
3dloco CreditAttribution: 3dloco commented+1
[edit]
I am experiencing the same issue too on content types that have a link cck field.
[/edit]
Comment #3
webflo CreditAttribution: webflo commentedConfirmed. Seems to be a problem with link.module.
Comment #4
rjbrown99 CreditAttribution: rjbrown99 commentedSame problem here, and content_presave does seem to fix it.
Comment #5
rjbrown99 CreditAttribution: rjbrown99 commentedHere's a patch for this. It's a one liner but I wanted to change the issue status.
I have been running in prod for this for more than 6 months. Patched against the 6.x-1.x git tree as of the time of this post.
Comment #6
renaissanceboy CreditAttribution: renaissanceboy commentedI'm having a similar problem on D7 with filelfield_paths 7.x-1.0-beta3 – is there a patch for that as well? I've found a few similar issues in the queue, but none are quite the same or have a solution I've been able to work with. Anyone have any ideas here? Screenshot attached.
Comment #7
Deciphered CreditAttribution: Deciphered commentedI'm going to need some more information on how to reproduce this issue, such as the setup of the content type that 100% introduces this issue.
The screenshot of the error is too generic to do anything with.
Comment #8
fprevos2 CreditAttribution: fprevos2 commentedThe patch also works for me. (for the D6 version)
Comment #9
Deciphered CreditAttribution: Deciphered commentedI never got any more information about the D7 variation of this issue, so I'm moving this back to D6.
I'm primarily concentrating on D7 development at this stage and have yet to make a decision on whether to move forward with D6 or not, but I will leave this issue in the state prior to the deviation for the moment.
Comment #10
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.