We had a feature with a single page_manager_pages
component, and wanted to remove it. The component was deselected from the Features UI, and the feature was regenerated.
While the component was no longer displayed as selected in the Features UI, it still existed in the Features code. This caused problems in the Page Manager interface, which stated that the page still existed "in code". The only way to fix the problem was to manually edit the features code and remove the xxx.pages_default.inc
file and references to pages_default
in the .info
and features.inc
files.
This only seems to be a problem when there is a single page_manager_pages
component in a feature, and attempting to remove the final one. If there is more than one page_manager_pages
component and a single page is removed, it works as expected.
Comments
Comment #2
SanderJP CreditAttribution: SanderJP commentedI've just noticed this problem as well.
Comment #3
mpotter CreditAttribution: mpotter at Phase2 commentedFeatures never deletes files. This is by design to prevent accidental data loss. You have to remove your old pages_default.inc file manually.
Comment #4
ron_s CreditAttribution: ron_s commentedMike, sorry if I wasn't more clear, I was just describing the steps taken. What I'm really suggesting is having Features remove the last item and leave an empty function. Maybe there is a reason of which I'm unaware why this isn't supported?
The same situation exists for other items... for example, if I have a Feature with one View, I can remove the View via Features UI, and it is no longer shown as selected. However since it is the only View attached to the Feature, it is still exists in code. I'm unable to delete the View through the Views UI until the code is manually edited.
However, I *can* work around this by adding a second View to the Feature and removing the first. This replaces the old View with the new, and then I can delete the old via the Views UI.
If I'm able to do this manually, shouldn't there be a way to support empty functions in the module?