Active
Project:
Features Override
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2011 at 10:35 UTC
Updated:
14 Oct 2015 at 13:42 UTC
Jump to comment: Most recent
Overridden views components do not appear in the dropdown at /dmin/structure/features/features-override/add
If I flush the cache, then my overridden views appear as options in the dropdown, however when I submit the form, I get the following error, and the overridden view no longer appears in the dropdown.
An illegal choice has been detected. Please contact the site administrator.
Notice: Undefined index: views_view in features_override_ctools_export_ui_form_validate() (line 59 of /Users/tom/workspace/alumni/profiles/alumni/modules/contrib/features_override/plugins/export_ui/features_override_ctools_export_ui.inc).
Comments
Comment #1
nedjoThanks for the report. There have been a lot of changes in Views, Ctools, and Features since I wrote this. I'll have a look when I have a chance.
Comment #2
g76 commentedsub
Comment #3
jessepinho commentedI'm experiencing the exact issue described by mrfelton. Any updates on this problem? This would be my primary use for Features Overrides, as I want to create feature modules containing improvements on existing views.
Comment #4
jessepinho commentedUpdating version, as this is still a problem.
Comment #5
mpotter commentedI need more of a step-by-step procedure for reproducing this. I created a View, added it to a feature. Then I changed the title of the view, then added this as an override in the FEATURE OVERRIDES (features_override_items) fieldset. This is all using the latest dev versions of Features 2.x and Features Override 2.x. So I'll need more info on exactly what changes you are making to the view that is causing the problem.
Comment #6
jessepinho commentedmpotter: in my case, I'm overriding a view that is part of the Drupal Commerce suite. So, the view is not part of a feature; it's just implemented by a hook_views_default_views(). When I override that view via the Views UI, my overrides do not show up in Features Overrides (except for in the case of clearing the cache, which results in an error, as described above).
Let me know if I can explain anything more fully. Love the module!
Comment #7
gribnif commentedI also ran into this, and figured out the reason. Normally, the MODULENAME.views_default.inc file is loaded magically by views, therefore the hook it contains may not be properly registered in Drupal core. The diff code in Features Overrides depends on module_implements(), which fails in this case.
The workaround I used was to simply add this line near the top of my MODULENAME.module file:
I also added this file to the "file[]" list in the MODULENAME.info file, but I don't think this would help by itself, and is probably not required.
(Note: In all cases above, MODULENAME is the machine name of the feature being overridden, not that of the module containing the overrides.)
Comment #8
jessepinho commentedNice find! That's got to be the reason for the problem.
The only problem with the solution, though, is that I don't want to modify contributed modules (like commerce_order_ui.module, for example, which has an includes/views/commerce_order_ui.views_default.inc file). Since a number of modules auto-load include files like this (Views and Rules come to mind), I'm thinking Features Overrides should modify its diff code, rather than requiring all contrib modules to modify the way they auto-load include files.
Comment #9
gribnif commentedI agree about not forcing everyone to modify their modules. I'm pretty sure there's a function in views to load the include (I don't recall the name offhand) which you can use before doing the hook check.
Comment #10
jessepinho commentedLooks like it's just views_include.
Comment #11
ShadowMonster commentedYou do not need make changes in contrib modules. You can also include this files in your own MYMODULE.module - the problem is patch - if you work with drush you will get problem to include it correctly. Anyway there is work around for it ex.:
I test it and is working but I have problem when try revert that feature wit store ex. cart form view - from features it not work at all - to can revert my view I have to use revert from View UI with seams work correctly.
Hope that help.
Found it thanks to E-Prepag.
Comment #12
pingwin4egAny progress? Will this be fixed in Features Override?
Comment #13
mpotter commentedI don't see any patch here to be committed to Features Override. What I see is a case where Views is not loading it's modulename.views_default.inc file because a View has not been Featurized. Features Override is only intended to work with Features. So if a View is in custom code and not in a Feature then it's probably up to that custom code to ensure the proper files and hooks are handled.
In any case, I still don't see how Features Override can solve this.