recoverable fatal error
jauzah - March 18, 2008 - 17:48
| Project: | Views Checkboxes |
| Version: | 5.x-4.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have installed your module, enabled the "Replace multi-select boxes with checkboxes" option and when viewing the views, the following error occurs:
recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/2cars/includes/form.inc on line 1307.

#1
This isn't a generic problem - the module worked fine for me. Maybe compatibility with something else - can you post your full module list and any other info?
#2
Please confirm whether this is still an issue with the latest release.
Please supply a list of modules that you're using so that I can attempt to duplicate your issue - it is not generic.
I'll close this issue in a week if I can't get further information - there's nothing we can do!
#3
I am getting the same error with the latest dev version. A few peculiarities to note, I have two exposed filters being converted to checkboxes on the page. The one with over 15 selections is having the issue while the one with 5 is not. It was also working earlier but something I modified seems to have upset it only for that one exposed filter. I am trying to retrace my steps but it seems even using my old php files isn't reverting anything. I'll update this post if I find out anymore. It might also be worth noting that I am using the latest dev build of Views.
#4
Maybe the number of selections is significant. I'll try creating a test with 15 or more selections - don't think I've got more than about 10 in any of mine at the moment.
I'll also try the dev version of views to see if that makes a difference.
One question - what are the data/widget types are used for the underlying data? Are they different between the one that works and the one that doesn't?
If I can duplicate this I'll aim to fix it, but without being able to duplicate the problem it would be shooting in the dark :(
#5
I did some tests of my own. For reasons beyond my understanding, any vocabulary I make after the one that works returns the error. Even if I duplicate the working vocabulary I get the error so the number of selections and vocabulary settings are not responsible. Views filter settings also seem to not matter. I tried disabling modules I thought could be interfering but no luck there unless there is a footprint in the sql tables messing with things. I'm going to start deleting sections of my template.php to see if any stray code is the cause, but things look bleak. I can't seem to unreproduce it O_o.
Edit: Nope, none of my template override code is the cause. I deleted the entire file and it still happens.
#6
Quick tests...
1. Number of items doesn't seem to be an issue - I tried with 20 and it worked. These were "integer" data types.
2. Use of Taxonomy term may be an issue. It worked ok as a listbox, but as checkbox I get things like "Object id #33" instead of the correct description. No error though. So, not sure about this - maybe it's a separate bug/problem.
#7
Ok, so are they taxonomy terms in all cases? Looks like there's a clue there. Multi-level of single-level?
#8
Yes, all cases are taxonomy terms and all single level or have the hierarchy disabled. And in all cases the select box works fine while the checkboxes give the errors. A quick test shows that only taxonomy terms are affected, node types, authors, ect all show checkboxes without errors.
#9
Ok, looks like the problem could be related to use of taxonomy terms - I don't get the error, but I do get other wrong behavior - "Object id #33" etc, so they are definitely broken somehow. I'll investigate.
#10
Found what looks like the problem - it's to do with taxonomy entries being "optional" vs "required".
Still testing, but I think you can fix it by finding where it says:
if (is_object($these_options[0]))
and change to:
if (is_object($these_options[0]) || is_object($these_options[1]))
Let me know if you try that.
#11
Updated version posted to CVS - here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/views_check...
I'm reasonably sure this fixes it.
#12
Hi Kripsy,
Please confirm if the problem is fixed in the latest dev release. If so I think it can be converted to a final 5.x.4 release.
#13
Sorry for the delay. I have been a bit busy. The patch does fix the error, but I seems to have run into another problem. The first item in my term list is omitted and if I turn 'Remove "None" Selector' off I get this error.
warning: Invalid argument supplied for foreach() in /home/projectu/public_html/sites/all/modules/views_checkboxes/views_checkboxes.module on line 148.I haven't tried reproducing this on a local host yet so I can't say with certainty if it is a problem of views checkboxes.
#14
I'm re-opening this ('cos I forgot about it!) -- did you get a chance to confirm the problem? I'll take a look anyway.
#15
Well, I can't reproduce the problem, but have added a line which should prevent that error - please check the latest dev version.
#16
Automatically closed -- issue fixed for two weeks with no activity.