Seems in some recent changes the page title hide option on full view mode is passing the option along to views pages even if the view is not showing full view mode.

I have a teaser mode (which does not have hidden page title) and a full view mode (that does hide the page title) and the option when toggled also toggles on the the views display layout.

I'll keep you posted if I can find where this is getting passed along.

Comments

joelpittet’s picture

Found it, I think.

in the ds_extras.module on line 883 of the function ds_extras_entity_view_alter

$layout = ds_get_layout($entity_type, $bundle, ds_extras_get_view_mode());

should be:

$layout = ds_get_layout($entity_type, $bundle, $view_mode);

because just below it's using the layout's hide_page_title settings on the full view_mode since ds_extras_get_view_mode() returns full since I guess it can't guess the view mode of the entity on the views page.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new919 bytes

Here's a patch

loominade’s picture

I had the same problem with version 7.x-1.5 but the patch fixed it as well

weri’s picture

Priority: Normal » Major

We had the same problem on views pages. The patch #2 works and uses the correct view mode from the given entity.

checker’s picture

Confirm bug and patch fixed it.

joelpittet’s picture

thank you, mind if I close this or do you keep it open till moved to the full release?

joelpittet’s picture

got my hopes up on that earlier comment, must have been sleepy I read checker fixed it. Patience, patience.

aspilicious’s picture

I'm working on display suite now and I had warnings on teaser due to this.
Will ping Swentel.

swentel’s picture

Ok, so there's indeed a problem with this, see also #1491324: Manually set page title via extras throws warnings, but the fix isn't right, I'll come up either this weekend or next weekend when doing the sprint.

swentel’s picture

Status: Needs review » Needs work
swentel’s picture

Status: Needs work » Needs review
StatusFileSize
new979 bytes

Here's a patch that should fix it better, can you guys test this ?

swentel’s picture

StatusFileSize
new968 bytes

Meh, wrong patch, this one is better.

swentel’s picture

Issue tags: +Needs tests

Tagging

swentel’s picture

Status: Needs review » Fixed
StatusFileSize
new3.2 KB
swentel’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Fixed » Active

Moving to 7.x-2.x
Something is wrong there, will investigate this weekend.

swentel’s picture

Status: Active » Fixed

Fixed in 7.x-2.x branch as well.

Status: Fixed » Closed (fixed)

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

BarisW’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Closed (fixed) » Patch (to be ported)

@swentel: can you please backport this to the 7.x branch as well?

swentel’s picture

Status: Patch (to be ported) » Closed (fixed)

That's in dev.

BarisW’s picture

Ah my fault. Thanks!

SandraVdv’s picture

When I update to 7.x-1.x-dev version to fix the page title problem I get other errors:
Notice: Undefined property: stdClass::$entity_type in node_ds_search_execute() (line 620 ...
Why is that?

SandraVdv’s picture

Is it possible that line 620 needs to change from
$fields = ds_get_field_settings($node->entity_type, $node->type, 'search_result');
to
$fields = ds_get_field_settings($item->type, $node->type, 'search_result');
$node hasn't got a property "entity_type"...

swentel’s picture

Ah damn, fixed in http://drupalcode.org/project/ds.git/commit/38f883a just yet. Will be available in next release.

SandraVdv’s picture

@swentel Ok, thanks!

wheatpenny’s picture

Thanks for the upcoming fix! I wanted to mention that switching to showing Fields instead of Content fixed it for me. Granted, that takes DS out of the picture on those views, but I thought I'd share in case it helps someone.

RKopacz’s picture

Issue summary: View changes

I made an assumption that a patch for this was committed to dev for 7.x-1.x. But I am currently using a View with fields only, not view modes. The content type displayed is not using the "show/hide page title" extra for DS. Yet the page title is still hidden on the view page.

You can see the view here

http://secretsofahomecook.com/secrets

I have experimented with turning off the hide page title extra and can confirm that it displays for this view when that feature is turned off site wide.

Are there other forum threads or patches available with can solve this for 1.x?