Notice: Undefined property: views_plugin_display_page::$display in views_page_title_pattern_alter() (line 49 of C:\xampp\htdocs\drupal7beta3\sites\all\modules\page_title\modules\views.page_title.inc).
Notice: Trying to get property of non-object in views_page_title_pattern_alter() (line 49 of C:\xampp\htdocs\drupal7beta3\sites\all\modules\page_title\modules\views.page_title.inc).

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Page Title
Version: 7.x-3.x-dev » 7.x-2.x-dev

This seems to be a bug of the page_title module.

nicholasthompson’s picture

The Views integration with Page Title is still very early and very buggy. A bit of a WIP...

mjgruta’s picture

subscribing...

Webgrafic’s picture

I have this after installation last Views module:
Notice: Undefined property: views_plugin_display_page::$display in views_page_title_pattern_alter() (line 48 of sites/all/modules/page_title/modules/views.page_title.inc)

sebish’s picture

Subscribe

Anonymous’s picture

Subscribing.......

ryan.armstrong’s picture

Been getting the same issue now that I updated to the latest dev of views.

Anonymous’s picture

Me too the same

Subscribing

ArchGalileu

www.gasparsantos.eu
www.quartetodouro.eu
www.cameratanovnorte.eu

goldlilys’s picture

Subscribing

Prudal-1’s picture

I am getting this too.

And so I can't update to any of the later versions of views as any "views" developed pages just go blank white :(

dawehner’s picture

@prudal
If you get a white page please first clear the page at least twice.
If this didnt't helped you can enable php errors, see on the "wsod" handbook page on drupal.org. Google for it, you will find it.

Once you have the php error behind your problem we can continue to help you.

jaymiejones86’s picture

@prudal
It could very well be a php memory issue, one thing to always check as most of your standard development environments come with a very low default memory_limit set.

vasike’s picture

subscribe

Notice: Trying to get property of non-object in views_page_title_pattern_alter() (line 49 of /path_to_drupal/sites/all/modules/page_title/modules/views.page_title.inc)

after i upgraded to Views 7.x-3.0-beta2

TripX’s picture

Priority: Normal » Critical

Duplicate issue: http://drupal.org/node/996760 which handles with the same phenomenon.

Problem occures since release of beta1/2 of views 3.0

ryan osītis’s picture

Subscribe

elachlan’s picture

Latest Dev stopped the WSOD, but I still recieve log messages about it.

geerlingguy’s picture

Subscribe.

jaymiejones86’s picture

it might seem silly but have you tried clearing your cache?

paranojik’s picture

This should solve the problem (views.page_title.inc - lin 47):

$pattern = $view->display_handler->get_option('page_title_pattern');
acoustika’s picture

Same notice in logs....

Tried changing as #19 but didnt seem to fix it....

paranojik’s picture

Sorry, I forgot to mention that my fix was for HEAD version of views 7.x.3.x-dev.

This worked for me on an older version of views 7.x.3.x-dev:

$pattern = $view->view->display_handler->get_option('page_title_pattern');
GalainHH’s picture

Works for me with the current beta of PageTitle (7.x-2.4-beta1) and current beta Version of Views (7.x-3.0-beta3)

Thanks!

ryan osītis’s picture

#19 worked for me using the latest version of Views 7.x.3.x-dev.

TripX’s picture

Mhm... can somebody commit and release this?

Prudal-1’s picture

Mr. paranojik, thank you very much for your efforts.

And so, for those that want to get Page Title and Views working together, here's what works for me....

Views 7.x-3.0-beta3
Page Title 7.x-2.4-beta1

paranojik's patch #19 as described here should be applied to Page Title.

An earlier patch was also needed, at least in my case, to be applied to this same Page Title module to eliminate these entity errors that kept coming upon my site:

Index: modules/user.page_title.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/page_title/modules/Attic/user.page_title.inc,v
retrieving revision 1.1.4.2
diff -u -p -r1.1.4.2 user.page_title.inc
--- modules/user.page_title.inc 25 Aug 2010 14:33:30 -0000 1.1.4.2
+++ modules/user.page_title.inc 8 Jan 2011 11:43:29 -0000
@@ -26,12 +26,12 @@ function user_page_title_alter(&$title)
function user_page_title_pattern_alter(&$pattern, &$types) {
// User
if (arg(0) == 'user' && is_numeric(arg(1))) {
- $types['user'] = user_load(array('uid' => arg(1)));
+ $types['user'] = user_load(arg(1));
$pattern = variable_get('page_title_user', '');
}
// Blog
elseif (arg(0) == 'blog' && is_numeric(arg(1))) {
- $types['user'] = user_load(array('uid' => arg(1)));
+ $types['user'] = user_load(arg(1));
$pattern = variable_get('page_title_blog', '');
}
}

Hope this helps someone

Regards
Mark
www.thelist.my

Anonymous’s picture

It works to me

Great module

Thanks
ArchGalileu

acoustika’s picture

Well still doesn't work for me...
But im also using latest dev version of both modules....
Im gonna try reverting back to page title beta version, since the latest dev version of user.page_title.inc doesnt look like you have on #25

acoustika’s picture

Well that did work....

#19 (only) for 7.x-2.4-beta1 did work, but this issue is marked 7.x-2.x-dev hence the confusion ;-)

subwoofer’s picture

Same issue. #19 worked for me as well.

postscripter’s picture

Version: 7.x-2.x-dev » 7.x-2.4-beta1

I have the same problem you had, the notice and the views appearing as blank pages.
Did you solve both problems by the above mentioned code changes? I tried but still not working for me.
I have:
Views 7.x-3.0-beta3
Page Title 7.x-2.4-beta1
Thanks in advance for you help

joelstein’s picture

#19 fixed it for me.

dmsmidt’s picture

Didn't work for me.
Views latest dev
Page title latest dev

elachlan’s picture

Stopped the WSOD with...

Page Title 7.x-2.x-dev (2011-Feb-25)
Views 7.x-3.0-beta3

I get a log message of severity "notice" with the message "Notice: Trying to get property of non-object in views_page_title_pattern_alter() (line 48 of /www/sites/all/modules/page_title/modules/views.page_title.inc)."

TripX’s picture

*edited*

dawehner’s picture

It really helps people if there is a real patch file attached. It's much easier to test the bugfix.

TripX’s picture

As it appears on a project of mine, I tested the mentioned tipps with following result:

Page Title 7.x-2.x-dev (2011-Feb-25)
Views 7.x-3.0-beta2
... and using the code line mentioned in #19 and #21: No changes!

Page Title 7.x-2.4-beta1
Views 7.x-3.0-beta2
... and using the code lines mentioned in #19 and #21: White screen of death!

So this didn't fix it for me. I cleared cache (of course!).

In general, this notice appears not always on the same page. It's more a random notice.

jcl324’s picture

Subscribe

AdamJH’s picture

I'm still seeing the issue with the most recent dev versions of either. What can be done to rectify the issue? Some of us have production sites up in dire need of a patch or fix.

Thanks in advance

NoDice’s picture

Status: Active » Needs review
StatusFileSize
new660 bytes

Attached is patch that makes this Notice go away - it is hacky word around and probably does not fix the underlying issue. But at least with this patch your watchdog won't be logging errors on every view refresh and notices will not appear.

NOTE: Clear cache at least once after applying patch

FYI, I'm using following modules:

  • Page Title 7.x-2.x-dev (2011-Feb-25)
  • Views 7.x-3.0-beta3
  • Chaos tool suite 7.x-1.0-alpha4
lolmaus’s picture

I confirm the patch #39 by NoDice removes the error output.

lolmaus’s picture

Version: 7.x-2.4-beta1 » 7.x-2.x-dev
TripX’s picture

Also can confirm that #39 solves the annoying notice line.

Shadlington’s picture

Subbing. This notice is annoying.

goby’s picture

Subscribing

rbennion’s picture

Fix in comment #19 worked fine for me.

Views 7.x-3.0-beta3
Page Title 7.x-2.4-beta1

gratefulsk’s picture

Patch in #39 was the only thing that worked for me. Thanks

AdamJH’s picture

Can someone put this into module format or show the edited/updated file with the patch in it for views.page_title.inc ? I'm not yet familiar with cygwin. Worried about messing up the server. Thanks!

Shadlington’s picture

Its just a workaround, not a proper fix.

andypost’s picture

StatusFileSize
new1.68 KB

Current implementation is totally wrong because $views object has no handlers so patch just replaces views structures with current implementation.

Suppose the proper fix should alter all page-type views plugins to insert it's own option(s) to produce pattern and substitution

jwilson3’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that the patch in #49 works against the latest dev release of views and page_title as of today April 18th.

1) page_title-7.x-2.x-dev (packaged 2011-02-25)
2) views-7.x-3.x-dev (packaged 2011-04-17)
3) applied patch in #49 to page_title.

All WSOD and php notices in dblog are gone. Patch looks solid.

fax8’s picture

Also working good here. Can we have this committed?

Blooniverse’s picture

Status: Reviewed & tested by the community » Needs work

... sorry, but after applying the patch from comment#49 my frontpage (which is a view as well) doesn't show the 1st part of the title (1st | 2nd) anymore. Instead of showing the pattern [site:name] (front) | [site:slogan] (as defined in the admin backend) the result [in pattern form] looks like | [site:name] .

But the rest seems to be all fine. I remember that, once in/around ~January 2011, exactly this bug used to be in the module, later on it was corrected.

Using:

  • 'page_title 7.x-2.x-dev (2011-Feb-25)'
  • 'views 7.x-3.x-dev (2011-Apr-23)'
  • 'ctools 7.x-1.x-dev (2011-Apr-22)'
Prudal-1’s picture

hi phi

I've experienced this issue you mention with all the versions of this module for D7. What you could do is go to the configuration page for page title and where you see the tokens for the front page area, just delete them and add in your website name, then the "|" character, then your slogan.

Hope that helps!

Blooniverse’s picture

Thank you, @prudal. Well, yes, your proposal is a valid workaround. A second workaround would be to just leave this particular form field empty.

Nonetheless, this behaviour should not be the case, which is why I have reported it in comment#52.

ALastorZ’s picture

For me works this :

$pattern = $view->display_handler->get_option('page_title_pattern');
// $pattern = $view->display->handler->get_option('page_title_pattern');

in line 47 of \sites\all\modules\page_title\modules\views.page_title.inc

davidsanger’s picture

same problem with View s 7.x-3.x-dev (2011-May-01) and Page_Title 7.x-2.4-beta1

Can someone possible update the PT dev version at least with the patches to avoid this bug?

I'd rather not be applying module patches. thanks

elachlan’s picture

Can someone please post a PATCH, not just what code to change. The developer will then be able to quickly apply it and release a new version.

Thanks in advance!

geerlingguy’s picture

Status: Needs work » Needs review
StatusFileSize
new613 bytes

Here's a git patch for #19. Works for me... someone else should review first, though.

anthonyR’s picture

Subscribe

mudsurfer’s picture

Same issues here
Page Title 7.x-2.4 beta1
Views 7.x-3.0 beta3

Subscribing.
My affected site has been running for about 3 months without any issues - no errors - not even any content changes in that time!
This error just suddenly started in the last 2 days. Freaking me out. I didn't touch anything - honest!

Will disable page-title until i get a grip on the patches/updates.

jim22’s picture

#19 worked for me.

geerlingguy’s picture

Can someone please apply and test the patch in #58 (which is basically #19), and if it fixes the problem, mark the status as RTBC? This issue will continue on forever until someone can review the patch (or come up with something better...).

Ferri’s picture

#19 real works!

Big thanks to drupal community! You are real rocks!!!!

andypost’s picture

#19 works only for views with page title, The proper fix #49

geerlingguy’s picture

Regardless, it'd be awesome if one of the two patches could get in, as both fix the problem for me... edge cases could be fixed in a followup.

dadderley’s picture

subscribe

catalin11’s picture

Assigned: Unassigned » catalin11

subscribe

allenshorter’s picture

subscribe

disparil’s picture

Fix in comment #19 worked fine for me.

Views : 7.x-3.0-beta3
Page Title : 7.x-2.4-beta1

timothymahoney’s picture

paranojik's fix - #19 worked perfectly - thanks!

dadderley’s picture

Same issue. #19 worked for me as well.

Thierry Andriamirado’s picture

#19 didn't work for me. Page Title 7.x-2.x-dev and Views 7.x-3.0-beta3. On both the local mirror of the website and the online one.

What's scaring is that both worked without problems, and began to show the notices and warnings at the same time. Maybe 1 hour after I installed TweetButton.

mudsurfer’s picture

Same issues after I modified based on #19 (and tried other variations above) - none had any effect, and errors remained.
Page Title 7.x-2.4 beta1
Views 7.x-3.0 beta3

Similar to Thierry Andriamirado above - my issues started suddenly - but in my case I have not applied any changes/updates or new modules. there was not even any new content. Only thing happening active on the site is cron runs... weird.
For now I have disabled the page-title module.
But will continue to assess and test where I can.

jeffschuler’s picture

Patch in #58 fixes this for me.

Views 7.x-3.0-beta3
Page Title 7.x-2.x-dev (2011-Feb-25)

Please review using the patch in #58 -- instead of making the change manually and reporting about #19 (even though it's the same change) -- so we can get this patch through.

Thierry Andriamirado’s picture

Actually, the issue began yesterday when I wanted to edit an already published blog post on the online website. The error messages appeared at the top of the edit page, and I noted that the language selection combobox was not visible. So as a test I tried to edit a blog post on the local version, and the error appeared too: same messages, but the language selection was active.

So, "at the same time"..: why?

pomliane’s picture

Patch in #58 fixes this for me too.
Page Title 7.x-2.4-beta1 + Views 7.x-3.0-beta3

jeffschuler’s picture

Status: Needs review » Needs work

OK. I take back what I said in #74... the patch in #58 does not appear to be a complete solution.

I'm seeing the same error again within the Views UI.

elachlan’s picture

Try #49 It implements more then #19

jeffschuler’s picture

StatusFileSize
new757 bytes

A combination of the approaches in #58 and #39 is working for me.

I'm including that here, but am actually going to roll back my changes and test the patch in #49, (and recommend others do too,) as it seems @andypost may have a more complete understanding of the underlying problem.

Jerome F’s picture

subscribing

Starminder’s picture

subscribing

andypost’s picture

Anyone tryed to run this code with debuger? $view->handlers does not exists at al

krak’s picture

andypost, yes.
subscribe

elachlan’s picture

@Andypost - That is why your patch is suggested! Can you please repost so people aren't confused?

trothwell’s picture

Confirmed #49 works well. Running 7.x-2.x-dev. Any ideas as to what happened here?

Thanks for the patch andypost.

joelstein’s picture

Status: Needs work » Reviewed & tested by the community

#49 works for me.

jeffschuler’s picture

Assigned: catalin11 » Unassigned

#49 working well for me.

criscom’s picture

subscribing

luckystrikerin’s picture

I still get this message in webforms (result page etc.):

Notice: Trying to get property of non-object in node_page_title_pattern_alter() (Zeile 39 von /var/www/drupal/sites/all/modules/page_title/modules/node.page_title.inc).

vimalramaka’s picture

subscribing

elachlan’s picture

@#89 - Did you apply the patch? Are you saying #49 does not work for you??

luckystrikerin’s picture

oh sorry obviously I made a mistake. I tried it again, now its working fine.

Anonymous’s picture

Hi all

Great job

#49 Works for me; my error was the "line 47" one

Thanks
ArchGalileu

www.gasparsantos.eu
www.quartetodouro.eu
www.cameratanovnorte.eu

davidzz’s picture

subscribing

ramez.gaberiel’s picture

StatusFileSize
new902 bytes

Possible fix to #89, also #89 make sure you are working with the latest dev version from the git

andypost’s picture

@TTLSMNR please don't confuse people with off-topic patches

ramez.gaberiel’s picture

I'm sorry Im kind of a noob here, i saw that # 89's comments was the same error I had so I thought I would reply, should I create a new issue somewhere else?

jwilson3’s picture

@TTLSMNR, the poster in #89 later realized his error was a mistake in #92. Please make a separate issue for the error.

For everyone else the patch in #49 is still RTBC by many people.

joostvdl’s picture

subscribe

jawi’s picture

same issue here.
subscribe

Jogurt’s picture

subscribe

ConradFlashback’s picture

subscribe

tomceek’s picture

when update to dev?

ConradFlashback’s picture

I will try the #89 patch, but the development of this important module can't exist with patches only.
Please update dev version.
Thanks to all :)

dbkern’s picture

#49 worked. Thank you!

wrg20’s picture

I got it to work using...a hybrid of #21 and #55
$pattern = $view->display_handler->get_option('page_title_pattern');

olafkarsten’s picture

#49 works, Thanks. There are some patches for views.page_title.inc from other issues. Maybe that make it a bit complex for the maintainer. Seems busy with other things.

nicholasthompson’s picture

I have just pushed the fix for the Views issue; I used the fixes from #21 and #55.

I have also pushed some fixes which expose the Page Title Pattern on a per-argument basis. The difficulty with this is regarding the way the submit handler unpacks the default settings over the top, removing any "excess" stuff from the form, like the Page Title setting. Had to add a secondary submit handler which re-sets the options on the handler.

Cheers for all the feedback on this guys. Sorry I've been rather tardy on getting this fixed.

I'm gonna get a new beta tagged release done ASAP.

nicholasthompson’s picture

Status: Reviewed & tested by the community » Fixed

Meant to mark as fixed.

Sue Mildrum’s picture

I have applied #49 and continue to get the error complaining about line 48.

The strange thing is that I started by upgrading my local machine to:
Page Title 7.x 2-4-beta1 (this was just before 7.x 2-4 was released)
Views 7.x 3.0-alpha

I got the error about line 47 (same line) when I went to a panel page that has a view in it. A regular page with a view worked fine. I was able to fix this issue by applying the patch provided here, which is the same as #19: http://drupal.org/node/1113352#comment-4525078

After thoroughly testing locally I started upgrading my live site to the same versions. I applied the same patch but now I got the WSOD when I went to the panel page with view. Then I found this thread and tried to apply the patch in #49 but it would not work against my version. So I got Page Title 7.x 2.4 which was released on June 28.

I tried applying the patch in #49 to that but it also failed (looks like some of the changes were already in views.page_title.inc). I manually made the change to the last elseif (very bad, I know, but desperate times call for desperate measures). I *still* get the WSOD on the panel page (but a regular view page display works fine) and I get the exact same error (now line 48):

# Notice: Undefined property: views_plugin_display_page::$display_handler in views_page_title_pattern_alter() (line 48 of .../www/sites/all/modules/page_title/modules/views.page_title.inc).
# Notice: Trying to get property of non-object in views_page_title_pattern_alter() (line 48 of .../www/sites/all/modules/page_title/modules/views.page_title.inc).

Disabling Page Title from the modules config page and clearing the cache does not solve the problem. Which is really strange because views_page_title_alter() shouldn't even be run, right? I hate to uninstall it because I'll lose my data.

Any ideas? Does my version of views matter?

elachlan’s picture

The fix was made available publicly. You should not need to patch it.

There is also a new version of views available at http://drupal.org/node/1192186

Try updating that first.

nicholasthompson’s picture

"...a panel page that has a view in it. A regular page with a view worked fine"
That's odd - Page Title shouldn't touch Panel Pages yet... How is the view embedded in the Panel (block, content pane, etc)?!

If you disable the module, then hook_page_title_alter() will never get invoked.... So the fact is is implies to me that it's not disabled.

Sue Mildrum’s picture

I updated to:
page_title-7.x-2.x-dev (June 28)
views-7.x-3.x-dev (June 28)
And the problem went away. Thanks.

nicholasThomson - I have a Content Pane containing a Slideshow view in my Panel. After updating to the views and page_title versions listed above, I was able to go in and edit the Panel Pane. Interestingly, I tried doing that on my local site which is page_title-7.x-2.4-beta1 and views-7-x-3.x-rc1 and got this error:
Fatal error: Call to undefined method stdClass::get_display_links() in .../sites/all/modules/panels/includes/display-edit.inc on line 68.

summit’s picture

Subscribing, greetings, Martijn

Status: Fixed » Closed (fixed)

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

crispin’s picture

I was getting this same error on the /admin/content/node page

FYI switching off Administration Views in the module list removed the error and was good enough for me