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

netgenius - April 4, 2008 - 16:18

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

netgenius - April 8, 2008 - 07:40
Status:active» postponed (maintainer needs more info)

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

Kripsy - June 8, 2008 - 20:53
Version:5.x-3.1» 5.x-4.x-dev

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

netgenius - June 8, 2008 - 21:35

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

Kripsy - June 8, 2008 - 21:47

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

netgenius - June 8, 2008 - 21:57

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

netgenius - June 8, 2008 - 22:00

Ok, so are they taxonomy terms in all cases? Looks like there's a clue there. Multi-level of single-level?

#8

Kripsy - June 8, 2008 - 22:11

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

netgenius - June 8, 2008 - 22:28

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

netgenius - June 8, 2008 - 23:53

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

netgenius - June 9, 2008 - 00:50
Status:postponed (maintainer needs more info)» fixed

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

netgenius - June 11, 2008 - 08:48

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

Kripsy - June 15, 2008 - 09:19

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

netgenius - June 20, 2008 - 09:31
Status:fixed» postponed (maintainer needs more info)

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

netgenius - June 21, 2008 - 00:30
Status:postponed (maintainer needs more info)» fixed

Well, I can't reproduce the problem, but have added a line which should prevent that error - please check the latest dev version.

#16

Anonymous (not verified) - July 5, 2008 - 00:34
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.