Closed (fixed)
Project:
View reference
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2011 at 14:31 UTC
Updated:
18 Mar 2016 at 10:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnvAnd also the following message, provoked by the same line of coding:
Notice: Undefined index: in theme_viewreference_display_title() (line 567 of viewreference.module)
Comment #2
danielb commentedNeed steps to reproduce - how is the view configured? Can you suggest the correct code instead of this?
$view->display[$display_key]->display_titleComment #3
willvincent commentedThe problem with this chunk of code is that it assumes that the view display being attached will have a title set, and that it is an object.
The attached patch resolved this issue for me. FYI - this patch was generated from my local svn repo from the output of 'svn diff'
Comment #4
danielb commentedI think those assumptions are reasonable :/ Why wouldn't the display be an object?
Perhaps when the display title is empty or missing we could use the display ID ?
I will try to create a view that has this problem.
I should try to get to the bottom of this because I've contributed very similar code to the views integration in Node reference and User reference: http://drupal.org/project/references
Comment #5
danielb commentedI can't reproduce this. I reckon maybe there was something wrong with your view and it needs to be resaved? If you can provide me with steps to reproduce a view that will cause this problem, please reopen.
Comment #6
Anonymous (not verified) commentedI used a view for View reference with a hidden title and the node body
It generates an error: Notice: Undefined index: in theme_viewreference_display_title() (regel 567 van /public_html/drupal-7/sites/all/modules/viewreference/viewreference.module).
With an unhidden title the error is gone.
I patched view reference with #3: this solved this issue.
Please make this patch a part of the next release.
Comment #7
danielb commentedsee #5
Comment #8
james.williamsThe issue is caused by viewreference field formatters that output the title, which call through to
viewreference_get_view()- which doesn't set the display key that is sent through to the theme function.The attached patch fixes this, as the display key is just in a different place.
Comment #9
rootd2 commentedthank you! You patch help me) It's work
Comment #9.0
rootd2 commentedremoving private part of path.
Comment #10
nerdoc commentedI can reproduce this bug as well, using viewreference v7.x-3.4, and can confirm that the patch from james.williams fixes this issue. Will this get included into the next release?
Comment #12
danielb commented