7

I just updated a site from 2.1.3 to 2.5.3 and I'm having some trouble with old file uploads.

First Problem
EE now seems to URL Encode the file URL which causes some issues with Image Sizer since it tries to use the encoded path.

Is there a way to get the unencoded path or do I need to modify Image Sizer or use a different plugin?

Second problem
Some of the old files had an & (ampersand) or other invalid characters in their name. After the upgrade when I did a sync on the upload directories it seems to have stripped those characters from the file names on the filesystem, but not from the actual File Upload Fields. Now I have to re-chose the files that got renamed and I get a PHP error (see below) when editing the entries.

A PHP Error was encountered
Severity: Notice
Message: Undefined index: filename
Filename: libraries/File_field.php
Line Number: 77

Is there a query I can run on all the upload fields, or anything else I can do to fix this?

Here's some examples of the files being renamed.
The name from the live server is on the left and the name from the dev server where I ran the upgrade is on the right.

MP900409379[1].jpg --> MP9004093791.jpg
004_LB-Cottages F&F.PDF --> 004_LB-Cottages FF.PDF

  • Did any of the answers help you? If yes, please mark the answer correct by clicking on the checkmark to the left of the answer. – Anna_MediaGirl Dec 22 '12 at 6:26
4

Did you check your channel's Posting Preferences? (Admin > Channels > Channel Prefs) Could "Automatically turn URLs and email addresses into links?" be turned on? This has caught me a few times in the past...

While ugly, you could otherwise wrap the output with URL Decode tags. This fall under the heading of "quick and damned-dirty" tho.

| improve this answer | |
  • 1
    It doesn't output anything for the files that got renamed, since the name of the file and the name from the file field don't match. For the ones that are getting URL encoded, I might as well just use a different re-sizing plugin that can handle encoded URLs. – Joseph W Dec 5 '12 at 14:17
1

Just a quick note, ImgSizer is no longer being updated, you may want to look at CE Image over on Devotee. The author is very quick to answer questions, you may want to ask him if his add-on will have the same issue.

| improve this answer | |
  • I have actually built my own image re-sizing plugin that should work, but I would rather not have to go through and replace all the ImgSizer tags if I can avoid it. – Joseph W Dec 4 '12 at 21:07
  • Hi Sue, for future reference, additional information that is not really an answer (such as this) should really be a comment on the original question and not an answer, thanks. – Tom Davies Dec 6 '12 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.