The new version of the module has changed my referenced views so they display with both the view title and the name of the display. For example, with version 3.4 I saw this:
What's happening at the IA Institute
Now I see this:
What's happening at the IA Institute - Homepage Block

Obviously I don't want what is an admin name to display on the home page of my site! If you edit the 'Display name' of a view you'll see in the description: "This name will appear only in the administrative interface for the View."

So I think this behaviour needs reverting or at least added as an optional setting (not default). Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tanc created an issue. See original summary.

demonde’s picture

I guess the problem comes from line 793:
$display_title = $variables['view']->display_handler->options['title'];

For some reason the ['title'] is empty in my case.

danielb’s picture

The problem is that this theme func was used in both admin forms and front-end display, so I'm proposing to just make it two functions.

  • danielb committed 639770c on 7.x-3.x
    Issue #2696787 by danielb: Theme function adds Views display title to...
danielb’s picture

Status: Active » Fixed
ataimist’s picture

Status: Fixed » Needs work

Commit 639770c934c717e3abe84c88f3f15fb691be9031 declares another theme_viewreference_display_form_title() function (it's now on both lines 834 and 871), resulting in a PHP fatal error ("Cannot redeclare theme_viewreference_display_form_title()"). I'm not fully clear on what this is trying to accomplish, so I'm not sure how to fix it :)

  • danielb committed 9c6624f on 7.x-3.x
    Issue #2696787 by danielb: Theme function adds Views display title to...
danielb’s picture

doh I somehow applied the patch to a version that was already patched

danielb’s picture

Status: Needs work » Needs review
ecoluke’s picture

This patch fixes the patch in #3 which was applied to 7.x-3.x in #4.

Needs to be applied to the current 7.x-3.x-dev.

Hope this helps,

Luke

tanc’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that this patch fixes the commit. The commit seemed to have copy pasted the two theme functions dealing with display and this patch removes a lot of the title display code from theme_viewreference_display_title() so that it correctly gets the title (if there is one) from $view->get_title(). Also confirm that when selecting a view I can now see the view name as well as the view's display names in the list which makes selecting a view much easier and was the original intention of the code changes.

ecoluke’s picture

Just thought I would check in with this - was my patch useful / will it get committed?

L

ecoluke’s picture

Just thought I would bump this again - is there anything else we can do to help expedite the patch's inclusion?

  • danielb committed c5fbf1c on 7.x-3.x authored by ecoluke
    Issue #2696787 by ecoluke: Theme function adds Views display title to...
danielb’s picture

I committed that, but I'm not sure about it now :/

If you create a view, with two displays and give them each a different name, wouldn't this patch show the wrong name in at least one of those cases?

danielb’s picture

Status: Reviewed & tested by the community » Needs review
danielb’s picture

Status: Needs review » Fixed

It seems to work fine

Status: Fixed » Closed (fixed)

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

ecoluke’s picture

Thanks! :D

ecoluke’s picture

Hi,

Are there any plans to release a stable version of this module with that patch rolled in?

It would be great to roll it out to our sites that use it and not have them on a dev version if possible - and it looks like this module is pretty stable!

All the best,

Luke