Problem/Motivation

I have some Views that I have disabled and when I export them or build Features for them (thus, exporting them!) the feature always sets disabled to false. I need them to export with the settings I set for them.

Steps to Reproduce

Build a View. Set the View to Disabled. Export the View, note that it exports with:


$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

...regardless of whether the View is enabled or disabled.

Proposed resolution

Make Views export write the actual disabled setting for each View.

Remaining tasks

Patch needed

User interface changes

None

API changes

None

I did not find any when searching through the CTools or Views issue queues, but I found #1959550: Features does not export enabled/disabled state a View in the Features queue.

Comments

franksj’s picture

StatusFileSize
new918 bytes

Including patch to check disabled and include the appropriate setting in the export.

kerasai’s picture

Status: Active » Needs review

Lets see what the test bot says.

kerasai’s picture

Issue summary: View changes
chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch in #1 to view.inc does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.

Checking patch includes/view.inc...
error: while searching for:
    $output .= $this->export_row('view', $indent);
    // Set the API version
    $output .= $indent . '$view->api_version = \'' . views_api_version() . "';\n";
    $output .= $indent . '$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */' . "\n";

    foreach ($this->display as $id => $display) {
      $output .= "\n" . $indent . "/* Display: $display->display_title */\n";

error: patch failed: includes/view.inc:1899
error: includes/view.inc: patch does not apply
andrew answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new919 bytes

Patch rerolled.