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!

Comments

Anonymous’s picture

same Problem here

NSp’s picture

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

Anonymous’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

Hi,

I solved the problem by replacing the code

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

by

        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
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

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

This stuff is way to complicated...

xjm’s picture

Project: Views (for Drupal 7) » 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

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.

arne@dbyte.nl’s picture

Patch in #11 fixes the problem for me to

sigveio’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.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

lendude’s picture

Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Cleaning up old issues.

This code changed a lot over the years, so there is a good chance that this got fixed, but since we have no steps to reproduce this on Drupal 8, that is hard to say for sure.

Please add some steps to reproduce this on D8 or move this back to the Drupal 7 queue if it is still relevant there.

pameeela’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

Going to close since there hasn't been any activity after @Lendude's follow up.