I have the latest -dev version and the page title in the confirmation step is NOT changed according to the operation (see screenshot).

View export attached.

The confirmation message works ONLY on pages (views) provided by admin_views module.

Thank you in advance for help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Garrett Albright’s picture

Category: Support request » Bug report
Priority: Normal » Major
Status: Active » Needs review
FileSize
1.28 KB

This seems to have worked at one time, but currently does not. The page title is set to the question when VBO calls confirm_form(), but then Views itself clobbers it with the View title.

Here's a workaround where we change the title of the View so that Views just clobbers the desired title with the desired title again.

Garrett Albright’s picture

Status: Needs review » Needs work

So my patch only works if you reload the page that the confirmation form is on. The *first* time that page loads, it still shows the View's title. I have no freakin' clue what's going on there; tracing through the code, I can't see where the title is getting reset between where I set it and where the title is retrieved again.

I also tried

  $view->display_handler->set_option('title', $title);

…but it's the same result.

This is a very strange bug.

Garrett Albright’s picture

I've checked out tags throughout the 7.x-3.x branches of both VBO and Views, and couldn't find a spot where this wasn't happening. Apparently this is a pretty long-running problem… Is there some other issue I couldn't find which has a lot more comments in it, or do people really not care that much about it?

In my case, the client needs it, so… I'm back at it.

bojanz’s picture

I don't think anyone pays attention, this is the first time I've seen an issue about it.
That said, I'm pretty sure it worked when I first wrote it (back in 2011).
But the title / breadcrumb handling of views / core fluctuated multiple times since then.

Garrett Albright’s picture

Status: Needs work » Needs review
FileSize
2.21 KB

Well, that's surprising.

It looks like any changes we try to make to the View in the form callback function don't "stick;" I guess because they're operating on copies of the View. Though why they'll then work just fine if you reload the confirmation form page… iz mystry. I got similar results why trying to set the title in theme_views_bulk_operations_confirmation(). I was hoping to avoid just implementing hook_preprocess_views_view(), but that seemed to be the only way I could find to get it working… =/

bojanz’s picture

Status: Needs review » Fixed

Committed, thanks.

marcusx’s picture

Status: Fixed » Needs work

This change has broken all my views titles.

I get either no title at all (for new views) or "<" = "&lgt" for existing views.

lmeurs’s picture

Status: Needs work » Fixed

@marcusx: Since this patch has been committed I created a new issue #2312547: Broken view titles, they often only display a < character and will set the status of this one back to fixed.

Status: Fixed » Closed (fixed)

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