Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I didn't see this issue anywhere else so sorry if this is a duplicate or by design.
When I go to export a page variant that's been disabled via the UI
$handler->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
is nonetheless always set.
While manually editing the export is possible as the comment suggests by far my most common use case is exporting with Features. I could manually update the features too, but ultimately a "drush features-update" would re-export the variant with "disabled = FALSE".
Comment | File | Size | Author |
---|---|---|---|
#8 | ctools-export_fix-1956528-7.x.patch | 973 bytes | pdcarto |
#6 | ctools-export_fix-1956528-5-7.x.patch | 1.07 KB | sgurlt |
Comments
Comment #1
lukio CreditAttribution: lukio commentedI have the same problem. Any idea?
Thanks!
Comment #2
rafaqz CreditAttribution: rafaqz commentedI'm also having the same issue.
Comment #3
rafaqz CreditAttribution: rafaqz commentedThis is a ctools issue...
from export.inc: 904-906
Changing it to something like this fixes the export. But it might break something else! who knows. There may be some reason it was hard coded, but that may be from the days before features was the main use of ctools export?
Comment #4
jessepinho CreditAttribution: jessepinho commentedI'm having the same problem. In my case, I have a Page Manager variant for the node view page in a Features module, but I've disabled it by editing the FEATURE_NAME.pages_default.inc file and setting
$handler->disabled
to TRUE. When I revert the feature using Drush, it attempts to revertpage_manager_handlers
every time, because it always thinks it's been overridden.Meanwhile in the Features UI's "Review Overrides" section for this feature module, it says the following:
$data['node_view_panel_context']->disabled = FALSE; /* WAS: TRUE */
So, this is the same issue as above; but I just wanted to point out that it affects Features and reverting as well.
Comment #5
texas-bronius CreditAttribution: texas-bronius commentedGood additional observation, @jessepinho. Specifically it shows like:
in feature-diff. As the original issue reporter notes, this manual change produces the desired effect of disabling the page on revert at deployment, but, indeed, future feature-updates rewrite to disabled => FALSE (and will un-disable at deployment). :(
Comment #6
sgurlt CreditAttribution: sgurlt at Bright Solutions GmbH commentedBased on #3 I created a patch for this on the latest dev version which fixes the issue for me.
Comment #8
pdcarto CreditAttribution: pdcarto as a volunteer and commentedHopefully this patch will pass testing (per https://www.drupal.org/project/ctools/git-instructions).
I made a slight change that sets the value of $disabled as 'FALSE' if $object->disabled == FALSE OR if it is not present. I don't know if $object->disabled can ever not be present, but it seemed safest to assume that it might not be. In that case, I assume that the exported object should not be disabled, since that seems to be the default.
Comment #9
pdcarto CreditAttribution: pdcarto as a volunteer and commentedComment #10
MustangGB CreditAttribution: MustangGB commentedI encountered this bug over in #2752965: Disabled property validation rule immediately overridden, patch works fine.
Comment #11
MustangGB CreditAttribution: MustangGB commentedComment #12
DamienMcKennaThis wasn't added to 7.x-1.10, bumping it to 7.x-1.11.
Comment #13
rivimeyPatch in #10 applies cleanly to 7.x-1.x
Seems to be good to go.
Comment #14
japerryFixed.