Download & Extend

File (Field) Paths does not work with Drupal 7.20 when images are inserted with the Insert module

Project:File (Field) Paths
Version:7.x-1.0-beta3
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If I use insert module with patch (http://drupal.org/node/1923336#comment-7096002) it insert a link with image style token. The token depend on (styled)image path. Filefield Paths modifies (styled)image path, but not regenerate (styled)image token (?itok=[Image token]) then (styled)image will be unaccessible after save content.

The original image link don't affected this issue.

see:
http://drupal.org/drupal-7.20-release-notes
http://drupal.org/node/1923336
https://drupal.org/sandbox/pp/1924318 (my little module witch generate itoken to old image links)

Comments

#1

Priority:normal» major

I believe this is a major problem.

#2

Title:_filefield_paths_replace_path function must regenerate image token» File (Field) Paths does not work with Drupal 7.20 when images are inserted with the Insert module
Status:active» needs review

Here's a patch that seems to work. It's ugly code, but I'm not sure how to fix it differently without refactoring the whole module.

AttachmentSize
filefield-paths-insert-module-1925298-2.patch 2.47 KB

#3

Status:needs review» reviewed & tested by the community

The patch work for me.

I made this steps: http://drupal.org/node/1923336#comment-7097378

After I made a node with styled image. Without patch the token was wrong and I can't download the image, with patch the token was good and image presented.

#4

Same here...

#5

Is there any chance of anybody linking to a patched filefields_paths.module file? I'm really struggling to patch mine...

#6

It should work.

AttachmentSize
filefield_paths.module.zip 4.09 KB

#7

I, too, was unable to patch, but the file in zip worked great.

Thank you for creating this fix. Solved huge problem for our site, where inserted images broke when CREATING a node, due to tokens in image path names and style not being generated on save. To work around, we had to create node, with images saved, THEN re-edit node and insert images. A real pain in the workflow. This patch solves a huge issue with us, so thanks!

-pat

#8

Status:reviewed & tested by the community» fixed

Thanks for the work, committed to 7.x-1.x.

Cheers,
Deciphered.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.