I enabled the 'archive' view and did not make any modifications to override it. However, when the following code is executed, 1 is unexpectedly printed.

drupal_set_message(views_get_view('archive')->disabled);

However, nothing is printed as expected if I make this slight modification.

views_get_all_views();
drupal_set_message(views_get_view('archive')->disabled);

Which would explain why it is not repro'ing in another places, namely the Views UI.

CommentFileSizeAuthor
#2 views-670308-DRUPAL-6--2.patch718 bytesMike Wacker

Comments

merlinofchaos’s picture

It appears that views_get_view() does not actually check the status of the single view it's loading against the variable that contains all the enabled/disabled statuses, while views_get_all_views() does.

I think it's always been this way. Apparently in 4 years no one has ever cared.

Mike Wacker’s picture

Status: Active » Needs review
StatusFileSize
new718 bytes

Well I care :)

Here's a patch which should fix it.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Patch works fine.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.