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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JordanMagnuson’s picture

I'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?

3dloco’s picture

+1

[edit]
I am experiencing the same issue too on content types that have a link cck field.
[/edit]

webflo’s picture

Confirmed. Seems to be a problem with link.module.

rjbrown99’s picture

Same problem here, and content_presave does seem to fix it.

rjbrown99’s picture

Status: Active » Needs review
FileSize
487 bytes

Here'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.

renaissanceboy’s picture

Version: 6.x-1.x-dev » 7.x-1.0-beta3
FileSize
61.06 KB

I'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.

Deciphered’s picture

Status: Needs review » Postponed (maintainer needs more info)

I'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.

fprevos2’s picture

Issue summary: View changes

The patch also works for me. (for the D6 version)

Deciphered’s picture

Version: 7.x-1.0-beta3 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs review

I 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.

Deciphered’s picture

Status: Needs review » Closed (won't fix)

No longer supporting Drupal 6 issues for this module.