I updated to latest release and got these error messages, when I uploaded a file
Notice: Undefined index: filefield_paths in filefield_paths_filefield_paths_process_file() (line 45 of C:\xampp\htdocs\drupal\sites\all\modules\filefield_paths\modules\filefield_paths.inc).
Strict warning: Only variables should be passed by reference in filefield_paths_filefield_paths_process_file() (line 66 of C:\xampp\htdocs\drupal\sites\all\modules\filefield_paths\modules\filefield_paths.inc).
Notice: Undefined index: host in _filefield_paths_replace_path() (line 292 of C:\xampp\htdocs\drupal\sites\all\modules\filefield_paths\filefield_paths.module).
Now my uploaded files are not being redirected to where I want them to go instead they are being dumped in the public files. Before upgrading to latest release this worked (uploaded files where redirected to where they should go based on some replacement patter tokens.
Comments
Comment #1
decipheredIt's always important to run update.php when updating a module, have you run update.php?
Comment #2
JoeJava commentedYes, no pending updates on Database.
Comment #3
JoeJava commentedI just loaded an old version of my site used 7.x-1.0-beta1, uploaded file and was placed in correct subirectory.
I then updated to 7.x-1.0-beta3, uploaded a file and got the errors shown and file was put into public area.
Comment #4
gmclelland commentedI just got the following error on a fresh site
Notice: Undefined index: host in _filefield_paths_replace_path() (line 292 of /home/quickstart/websites/tester.dev/profiles/da7/modules/contrib/filefield_paths/filefield_paths.module). (x11)It happened when I uploaded multiple images to an imagefield on a term using http://drupal.org/project/1115362 and http://drupal.org/project/multiupload_imagefield_widget.
Comment #5
gmclelland commentedJust tried the same thing with an multivalued imagefield on a term, but this time I tried using it with the http://drupal.org/project/plup module. Same errors
Notice: Undefined index: host in _filefield_paths_replace_path() (line 292 of /home/quickstart/websites/tester.dev/profiles/da7/modules/contrib/filefield_paths/filefield_paths.module). (x11)Comment #6
adroid commentedI also confirm the error.
Comment #7
sw3b commentedSame for me with plup and multiupload_imagefield_widget.
Comment #8
decipheredI just installed a fresh copy of D7 with File (Field) Paths beta1, set it up and uploaded, confirmed it worked, then upgraded to beta3, ran update.php then uploaded a second piece of content and everything worked perfectly....
Unless you give me a way to reproduce this issue I can't do anything.
Cheers,
Deciphered.
Comment #9
sw3b commentedafter clearing cache and some magic dust the message disapear...
for me it do not make it anymore...
Comment #10
nico_2802 commentedI experience exactly the same problem as described above. I did all the things, recommended here, have no pending database-uptades, everything is the latest version and it is generally a very simple installation with just a few extra modules installed. Yet, I get that error-message and I dont quite understand how it was solved by "clearing magic dust"... can u be more specific?
Appreciate any help!
Comment #11
decipheredHi china-design,
Not to sound rude, but confirming the issue does absolutely nothing to help resolve the issue. I accept that the issue is valid, but I was unable to reproduce the issue every time I attempted to, so unless someone actually decides to provide me with some specifics on their setup and provides me some guaranteed steps to reproduce the issue then there's absolutely nothing I can do about the issue.
I would be extremely grateful if you could take a few minutes of your life and try to help, or to put it in your own words; "can u be more specific?"
Cheers,
Deciphered.
Comment #12
gmclelland commented@Deciphered - Here is the steps I took
Create a content type called "Image Gallery"
Add a field called "plup" type > "Image", widget > Plupload
Set File path to "galleries/[node:nid]/"
File Path Options
checked - Cleanup using Pathauto.
checked - Transliterate.
File name
[file:ffp-name-only-original].[file:ffp-extension-original]
File Name Options
checked - Cleanup using Pathauto.
checked - Transliterate.
checked - Enable Alt field
Number of values - Unlimited
using the public files
Using the latest Drupal and
Modules in use:
Media-2.x-dev
File Entity-2.x-dev
http://drupal.org/project/plup
filefield_paths - 1.0-beta3
plupload - 1.0-beta4
Here is the error I get when I create a node.
I will try a standard image/file field to see if I can narrow down the problem. Let me know if you need any more information.
Comment #13
gmclelland commentedJust tried the same with type > "Image", widget > "Image"
This did not produce any errors when I saved the node.
Comment #14
gmclelland commentedThis could be related #1412634: Insert & Filefield sources integration
Comment #15
gmclelland commentedI think this may only be happening with plup module + File Field Paths module. I can't seem to reproduce it with http://drupal.org/project/1115362 + http://drupal.org/project/multiupload_imagefield_widget + File Field Paths module.
Hope that helps
Comment #16
Fidelix commentedThis has nothing to do with the module upgrade, I think.
I have this problem as well, and I'm using the plup module.
Comment #17
marcusn commentedI got rid of this error after disabling "File (Field) Paths"-module.
Comment #18
Bernsch commentedI have the same Error-Message:
Notice: Undefined index: filefield_paths in filefield_paths_filefield_paths_process_file() (Zeile 45 von C:\wamp\www\drupal\sites\all\modules\filefield_paths\modules\filefield_paths.inc).
I use the Multiupload Imagefield Widget Modul.
its the same issues?
Comment #19
Fidelix commentedSince this is easily reproducible, I guess this is a confirmed problem, so I'm turning it back to active.
If the maintainer disagrees, please set the status back.
Comment #20
michelleI honestly don't know if my issue is the same. If it's not, I would be happy to file a new one. Here are the facts that I know:
Comment #21
hass commentedAlso have this warning. Just create a node, publish them directly and a red error is shown.
Comment #22
carl.ben commentedNotice: Undefined index: host in _filefield_paths_replace_path() (line 292 of /public_html/sites/all/modules/filefield_paths/filefield_paths.module).
I'm using Multiupload Filefield Widget.
Not using Multiupload Imagefield Widget (which is dependant on MFW).
Not using PLUP.
Comment #23
decipheredHi guys,
The problem is this:
1. To allow the resetting of the filename by token I store the original uploaded name to a new column in the file_managed table; 'origname'
2. Plup changes the filename before it hits filefield_paths_file_presave() (which is where the origname is stored), so the wrong filename is stored in the 'origname' column.
3. The default token set for filename is pulling the value from 'origname'
Therefore, this issue is actually not an issue with File (Field) Paths but is the expected behaviour. I'm sorry, but that is the truth of it.
I'm moving this issue into the Plup queue because it is the cause of this issue, and I believe it is their responsibility to fix the issue. I'm happy to discuss that point that.
Two proposed fixes:
1. Trigger hook_file_presave before File (Field) Paths and reset the filename
2. Update 'origname' in the database at some point.
Note: For those of you who have a non-Plup related issue, please point it out and I'll try to separate out the issue.
Cheers,
Deciphered.
Comment #24
hass commentedI'm NOT using Plup.
Comment #25
deciphered@hass,
The error reported by you is in no way related to this issue, if you have a similar issue to this issue without Plup I'd be more than happy to fix it if you can provide me with some details and reproducable steps in a new issue. The only reproducable steps in this issue where using Plup and that issue is confirmed as mentioned above.
Unfortunately this is what happens when there are multiple unrelated issues in a single case.
Cheers,
Deciphered.
Comment #26
decipheredP.s., some of the original issues in this case (undefined indexes) have been fixed and will be committed ASAP, but all further discussion in this issue is to be related to the Plup issue.
Comment #27
gmclelland commentedThanks @Deciphered for checking on this. It seems like it is isolated to plup module only, I can't reproduce the error with the other modules - http://drupal.org/project/1115362 + http://drupal.org/project/multiupload_imagefield_widget
Comment #28
Bernsch commentedI got error on D7 with error below
I use:
Drupal: 7.12
Plup: 7.x-1.0-alpha1
File (Field) Paths: 7.x-1.0-beta3
and the image on the server gets a strange name --> p16nsnqa5e12o0134d1t951mbmmq94.jpg
The Bug is bevor i see/try Post #23.
--> link to file(field)path issues
ll try Post #23
Comment #29
Anonymous (not verified) commented