Closed (fixed)
Project:
File (Field) Paths
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2012 at 07:49 UTC
Updated:
9 Nov 2012 at 00:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
decipheredHi,
Token is a requirement of File (Field) Paths in both Drupal 6 and 7, therefore it shouldn't even allow you to run the File (Field) Paths updates without Token enabled. If you could give me some way to attempt to reproduce the issue so I can see it in action I might be able to resolve it.
Cheers,
Deciphered.
Comment #2
Gfuber commentedI did this:
update a drupal 6 site (which uses file field paths) to drupal 7
then i copied the new drupal 7 modules like filefieldpaths and token to the website, WITHOUT activating them
i activated filefieldpaths and run update.php
then the error occures
Comment #3
decipheredAgain, as I said, Token is a requirement of File (Field) Paths, so Token would be automatically enabled when you enabled File (Field) Paths... which is why I'm confused.
However I suspect that the issue has nothing to do with Token anyway, I'll try to reproduce the issue shortly and see what I can come up with.
Comment #4
13rac1 commentedTo reproduce:
Result:
Temporary workaround is to delete File Field Paths, run update.php for all other new modules, download File Field Paths, and run update.php for File Field Paths.
Comment #5
markwk commentedRan into the same error.
Comment #6
xtfer commentedDrupal will run the upgrades whether the modules are actually enabled or not, so this really needs to be fixed in Filefield Paths.
Adding a
drupal_load()to the start offilefield_paths_update_7107()should be sufficient to fix the issue:Comment #7
KhaledBlah commentedI can confirm this error as well. This is a blocker IMO.
Comment #8
denes.szabo commentedThe code at #6 seems work.
Comment #9
q0rban commentedRan into this myself. As xtfer says, "Drupal will run the upgrades whether the modules are actually enabled or not." Enabling Token didn't fix it for me, but actually enabling Filefield Paths did. Attached patch throws an exception if either modules are disabled.
Comment #10
decipheredI'm inclined to go with a combination of #6 and #9, something that forces the required dependent files to be included and throws an exception if the required files aren't present.
Patches welcome.
Comment #11
decipheredTest and confirmed the error and fix, opted to go with just #6 as it just works, Token module doesn't need to be present for the upgrade so no need to warn if it isn't.
Committed.
Comment #12
xtfer commentedThanks.
Comment #14
off commentedThank you! Its worked!
Just Need to turn on the module