We're getting this error repeatedly on our site, and it appears (according to our host) to be intermittently bringing our site down for 10-60 minutes at a time:
PHP Fatal error: Unsupported operand types in /sites/all/modules/views/includes/handlers.inc on line 1020
I have searched the forums and issue queues and can only find questions about this where the problematic view is known. My problem is, I have no idea which View this is. I've been working with a lot of our commonly used Views lately, and have not gotten any errors about operand types while I work with them.
We have a lot of Views; it would be prohibitive to open all of them one-by-one to see if there are errors. Isn't there any more diagnostic tool or data that can reveal the View with bad code in it?
I'm running the following configuration:
- Views 7.x-3.3+103-dev (2012-Apr-17)
- Panels 7.x-3.2
- Chaos tool suite 7.x-1.0
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1548230.patch | 660 bytes | dawehner |
Comments
Comment #1
dawehnerI would wrap the code with some code which takes sure that $this->placeholders is an array. If it's not given use an empty array() and automatically log the view somewhere, so you can find it later.
Comment #2
somatics commentedI'm sorry, but I don't understand what you're talking about. I don't know how to wrap the code like you're talking about. Can anyone explain further?
Comment #3
dawehnerYou could do something similar to the attached patch to see which view is causing that.
This looks that to the watchdog.
Once you have that information you could provide an export of the view, so it's a bit more clear what's causing this.
Comment #4
somatics commentedThanks for this. I really appreciate it. I'm hoping you you hold my hand on this just a tiny bit more:
My hosting platform makes command line patching of site code a bit cumbersome, so I'd like to manually add this patch to the appropriate file.
I'm not sure if I'm understanding the patch. I can't tell if there's anything I'm supposed to change or if I can just add this code. Could you clarify precisely where I place this code and If I remove anything?
Also, I do patch contrib modules as needed, but just because in general I prefer to not patch core if I can avoid it -- is there a module I can install to get this information? I do have the Devel modules available -- are there Devel functions I can use to record this Views information?
I'm seeing this Views error every 45 minutes to 2 hours, so I'm really eager to get rid of it asap. I really appreciate your help.
Comment #5
dawehnerWhy not patch locally and push after that?
From my perspective this is the only way to find out the root of the problem.
Comment #6
esmerel commented