After upgrade from 7.3.3 to 7.3.4 (also on 7.3.5) i faced following error on some pages:

Fatal error: Unsupported operand types in [path to drupal]/sites/all/modules/views/includes/handlers.inc on line 1032

File 'handlers.inc' on line 1032 contents 'add_condition' function, string:

) + $this->placeholders;

System log contains:

Notice: Undefined property: views_many_to_one_helper::$placeholders в функции views_many_to_one_helper->add_filter() (строка 1032 в файле [path to drupal]/sites/all/modules/views/includes/handlers.inc).

Following investigation shows that error exists only if contextual filter appling to taxonomy term.

Example is: http://doc20vek.ru/persons/%D0%97

Exported view in attachment.

Please help!

Files: 
CommentFileSizeAuthor
#18 views-1752062-18.patch544 bytesfastangel
PASSED: [[SimpleTest]]: [MySQL] 58,506 pass(es).
[ View ]
#16 many_to_one_fix.patch511 bytesaspilicious
PASSED: [[SimpleTest]]: [MySQL] 3,134 pass(es).
[ View ]
#11 views-1752062-11.patch479 bytesdawehner
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]
#6 includes_handlers.inc_.git_.patch785 bytesNewSky
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]
#4 includes_handlers.inc_.patch786 bytesNewSky
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch includes_handlers.inc_.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
persons_view.txt7.63 KBshardach

Comments

rmn_hnz’s picture

same Problem here

NSp’s picture

Same problem, and problem exists only with taxonomy in glossary mode

rmn_hnz’s picture

Yepp, right: Problem existis only in glossary mode.

Once I switch on the glossary mode, the error log says:

[Mon Aug 27 20:07:38 2012] [error] [client 127.0.0.1] PHP Fatal error: Unsupported operand types in /Library/WebServer/Documents/sites/all/modules/views/includes/handlers.inc on line 1032, referer: http://goc.songofthepaddle.de/admin/structure/views/view/test

The durpal protocol:

Notice: Undefined property: views_many_to_one_helper::$placeholders in views_many_to_one_helper->add_filter() (Zeile 1032 von /Library/WebServer/Documents/sites/all/modules/views/includes/handlers.inc).

NewSky’s picture

Status:Active» Needs review
StatusFileSize
new786 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch includes_handlers.inc_.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Hi,

I solved the problem by replacing the code

<?php
        $placeholders
= array(
         
$placeholder => $value,
        ) +
$this->placeholders;
?>

by

<?php
       
if(isset($this->placeholders)) {
         
$placeholders = array(
           
$placeholder => $value,
          ) +
$this->placeholders;
        }
        else {
         
$placeholders = array(
           
$placeholder => $value,
          );
        }
?>

in includes/handlers.inc file, in add_filter() function.

However, I don't know for the time if it causes collateral damage.
Everything seems to work for me for now ...

Status:Needs review» Needs work

The last submitted patch, includes_handlers.inc_.patch, failed testing.

NewSky’s picture

StatusFileSize
new785 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]
Robin Millette’s picture

Status:Needs work» Needs review
Raptor’s picture

Status:Needs review» Reviewed & tested by the community

Hi, I was having an issue with contextual filters causing a HTTP 500 error and the PHP error which is listed in the bug report. After applying this patch the HTTP 500 and PHP errors / warnings stopped occuring.

http://redev.synapse.net.au/organisations/a-z/a

XerraX’s picture

confirming that #6 works

Aurochs’s picture

Confirm patch from #6 helped me to solve the problem with latest Drupal 7.x-dev and latest views 3.5

dawehner’s picture

StatusFileSize
new479 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]

I believe this patch will fix the issue in a more easy way.

Countzero’s picture

Got 500 errors on an Ajax enabled views with taxonomy stuff, and this patch made it disappear.

Thanks.

jodym’s picture

Patch #11 worked for me, thanks.

slayne40’s picture

Same problem ( taxonomy in glossary mode )
Patch #11 worked for me.
Thanks.

dawehner’s picture

Version:7.x-3.5» 8.x-3.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Thanks for testing! Committed this patch to d7.

aspilicious’s picture

Status:Patch (to be ported)» Needs review
StatusFileSize
new511 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,134 pass(es).
[ View ]

This stuff is way to complicated...

xjm’s picture

Project:Views» Drupal core
Version:8.x-3.x-dev» 8.x-dev
Component:taxonomy data» views.module
Status:Needs review» Needs work
Issue tags:+Needs reroll, +VDC
fastangel’s picture

Status:Needs work» Needs review
StatusFileSize
new544 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,506 pass(es).
[ View ]

Rerolled.

fonant’s picture

Patch in #11 fixes the problem for me, Drupal 7.

xjm’s picture

Status:Needs review» Needs work
Issue tags:-Needs reroll+Needs tests

Thanks @fastangel!

NW now for some tests.

stevenmhouse’s picture

D7, Views 3.5 - view using attachments - patch in #11 worked for me

Thanks

damiankloip’s picture

@fastangel, tests? :)

fastangel’s picture

I am trying reproduce this error on my local but I can't attach one display. I get a list empty in 'attach to'. I was seeing the code and in the options displays the list is always empty. Is other bug?

jfew’s picture

Version:8.x-dev» 7.15
Status:Needs work» Patch (to be ported)

D7.15, Views 3.5 - using a clone of the default glossary view - patch in #11 worked for me. This problem appeared only after I updated Views from v3.3 to v3.5.

somatics’s picture

I get an error which I believe is the same issue. However, I am using the latest dev version of Views (2012-Nov-11), which is significantly newer than Views version 3.5 (2012-Aug-24) and newer than when these posts say the patch was rolled into Views.

When I put any incorrect path, e.g. "cats" or "dogs", after the View's url, I get a WSOD.

It appears the Contextual Filter for <(term) Taxonomy term: Name> that I have configured for this View seems to kick in and get stuck on not being able to find the specified filter criteria. Here's the PHP error I get (I also get server error logs, which I include in the post I link to below):

Notice: Undefined property: views_many_to_one_helper::$placeholders in views_many_to_one_helper->add_filter() (line 1032 of /path-to-drupal/sites/all/modules/views/includes/handlers.inc).

I had not found this issue last week, and so I posted my own issue for my situation at http://drupal.org/node/1836184

The effect of this problem is so bad, it often locks up my website!

bonobo’s picture

Version:7.15» 8.x-dev

Setting the version back to 8.x-dev - it looks like this was unset in comment 24.

dawehner’s picture

Status:Patch (to be ported)» Needs review

Set to needs review. Not sure whether we want to have tests for that, though writing tests for many to one handler is less easy then you would expect it to be.

D-Byte’s picture

Patch in #11 fixes the problem for me to

hoesi’s picture

Note to anyone who might come across this issue, to save you looking for it; the patch from #11 has been worked into the dev version.

(It does however not exist in 3.5 - the current stable version. You'll have to either apply the path, or use -dev, in other words.)

jibran’s picture

#18: views-1752062-18.patch queued for re-testing.

jibran’s picture

Status:Needs review» Needs work

NW as per #20.