Hello
I tried to use page_title in views (without any success for now) so I made a display in a view with the page_title option. Because I failed to make it work, I've deleted this display, and left my view has it was before my test.

Since then, when I go on pages made by views, I got this srtict warning :

Strict warning : Only variables should be passed by reference dans views_page_title_pattern_alter()(line 33 in /sites/all/modules/page_title/modules/views.page_title.inc).

Anyone has an idea from where it can come from ?
Maybe must I delete something in the DB ?

Thanks for your help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicholasThompson’s picture

I wonder what's being passed into that function which isn't a variable?!

anou’s picture

Is that suppose to mean that I can't pass some fixed string, must only use the tokens ?
...

nicholasThompson’s picture

You cant alter a fixed string - however you can alter a string assigned to a variable... eg:

Bad:

thingy('test');

function thingy(&$var) {
  $var = 'another test';
}

Good

$a = 'test';
thingy($a);

function thingy(&$var) {
  $var = 'another test';
}
Marshall_Kennard’s picture

To fix the original problem in views.page_title.inc, replace line 33 with this:

// $h = array_shift(array_splice($h, count($args)-1, 1));
$hh = array_splice($h, count($args)-1, 1);
$h = array_shift($hh);

awm’s picture

subscribe

wusel’s picture

I get the following error-message:

Strict warning: Only variables should be passed by reference in views_page_title_pattern_alter() (line 33 of C:\xampplite\htdocs\abt\sites\all\modules\page_title\modules\views.page_title.inc).

Please help me.
Thanks in advance

Lostmonkey’s picture

I get the exact same error-message (#6), did you solve it?

a.milkovsky’s picture

Marshall_Kennard , thanks

Lios’s picture

That is the same message as the original post and the solution is in post #4...

peximo’s picture

Status: Active » Needs review
FileSize
0 bytes

Attached patch from comment #4

peximo’s picture

Sorry empty patch; this should be right.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works as advertised.

IckZ’s picture

works! thanks for sharing :)

dercheffe’s picture

An update of the module which includes this patch would be great :)

nicholasThompson’s picture

Status: Reviewed & tested by the community » Fixed

This is fixed and committed into Dev branches for D6 and D7. Tagged release soon!

Status: Fixed » Closed (fixed)

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