Closed (won't fix)
Project:
Features
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2011 at 18:24 UTC
Updated:
23 Aug 2012 at 18:07 UTC
If two features contain imagecache presets with the same names, it causes hook_imagecache_default_presets to populate presetname with an array instead of a string, causing the error 'Illegal offset type in isset or empty in imagecache.module on line 1006'. Features should probably prevent this.
Comments
Comment #1
hefox commentedYou have two features with the SAME component enabled at the SAME time? That won't work. Two features should can not define the same components; that'll cause issues with most things.
They're not listed as conflicting at admin/build/features?
Comment #2
lambic commentedYes, we had two features with the same component. I agree it should not work, but it should not work more cleanly. There was no conflict listed, the only clue we had was the alerts coming from imagecache.
Comment #3
hefox commentedWere both the duplicate components listed in the .info? Ie, is the bug is that something went wrong with the conflict handling?
Can you confirm that they totally didn't list as conflicts on features page? (It's possible to get conflicting with updating features and so may have not noticed they were conflicting)
Comment #4
lambic commentedYes, both .info files had 'features[imagecache][] = "medium"'.
I've been told there were no conflicts, but I didn't see it with my own eyes. When I have an hour to kill I'll revert back to the old versions on a test site and check for myself.
Will Features allow two features to be enabled if they conflict with each other?
Comment #5
hefox commentedVia admin/build/features it should not allow enabling disable a conflicting feature; I believe it disabled the checkbox.
Comment #6
lambic commentedWe use drush en/dis to enable and disable them, maybe it doesn't respect collisions. I'll experiment.
Comment #7
hefox commentedThat'd likely be it. I'm not sure there's anything features can do it that case, at least for d6. It could try implementing hook_requires for the module, but ouch.
Comment #8
nicholas.alipaz commentedWas able to confirm this issue. I have a multisite setup and I have a feature in the sites/all directory as well as in the sites/mysite directory. It is the same feature and contains some differences in each directory, although they both provide the imagecache presets, we receive the same isset error when it resides in both.
Comment #9
hefox commentedChecked against -development version of features and was not able to export the default image styles (they did not show as options); how were you able to create a feature with this items?
I'm playing around with an experimental version of features_override (2.x-experimental) and almost have exporting of overrides to the default image styles working.
Comment #10
nicholas.alipaz commentedWell, lets say that you created a feature on one of your sites, and you drop it into the sites/all/modules/[yourfeature] directory, you then start using it on a few sites:
site A:
sites/all/modules/[yourfeature]
site B:
sites/all/modules/[yourfeature]
You then decide to use it for site C, but you realize that it will need some changes, so you simply copy the feature from sites/all/modules/[yourfeature] to sites/[sitec.com]/modules/[yourfeature]
site C:
sites/[sitec.com]/modules/[yourfeature]
To change the feature you just go to the recreate page for the feature and modify it as necessary, recreate it and replace the copied version under the sites/[sitec.com]/modules/[yourfeature]
The fact that the module exists in both sites/all/modules and sites/[sitec.com]/modules will cause the isset/empty error mentioned in this issue.
Comment #11
mpotter commentedClosing this for lack of activity. Please re-open this issue if you can reproduce it in the latest version.