Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get the following error when trying to display any of the calendar views:
Fatal error: Cannot use object of type date_api_argument_handler as array in ..\sites\all\modules\calendar\calendar.views.inc on line 504
I'm using the last dev version of the views module from CVS, the most recent (Beta2) version of the date module and the Dev version of the calendar module
Comments
Comment #1
cps@groups.drupal.org CreditAttribution: cps@groups.drupal.org commentedI have the same Error:
Date 6.x-2.x-dev (2008-Jun-11)
Calendar 6.x-2.0-beta2
Views 6.x-2.x-dev (2008-Jun-11)
but in line 500
Comment #2
mrfelton CreditAttribution: mrfelton commentedsame issue for me (different line number). Using latest CVS for date, calendar, cck and views:
Fatal error: Cannot use object of type date_api_argument_handler as array in /home/tom/www/playhouse-6.2/sites/all/modules/calendar/calendar.views.inc on line 500
Comment #3
imagetag CreditAttribution: imagetag commentedSame here. Lastest build from views, newest betas of calendar and date.
Comment #4
loze CreditAttribution: loze commentedYup. me too
Comment #5
gvdvenis CreditAttribution: gvdvenis commentedI did an attempt to sort this out, and i did manage to get rid of all the errors and white screens, but i probably broke some other stuff alongside with the "fix". Anyway beneath is the code i started changing to get started. After that, i got confronted with a lot of other problems. The only problem is that i do not know if this is a result of the issue at hand here, or if it's a result of my changes to this code.
As you can see in this code, the $argument variable structure has changed from an array to an object somehow and some attributes have probably been moved to a separate "options" array.
Anyhow, the whole thing seems related to changes in the Views module. Hope this helped someone getting this issue fixed. If anyone has interest in a patch of all the changes i made to get rid of all errors (whether they are correct or not) please let me know and ill post a patch here.
Comment #6
KarenS CreditAttribution: KarenS commentedI'm not getting this error, so I'm having trouble figuring out why others are.
Comment #7
imagetag CreditAttribution: imagetag commentedCould it be, that the views dev changed since your last commit? The Dev on that FTP is packaged after your last release? Just guessing.
I read, that this error only affects PHP5, cos the script tries to handle an object, like it was an array. Since PHP 5.2 (imo), that's forbidden. I printed out the $argument and found some different object recursion, this of course, could be a problem, too.
Comment #8
KarenS CreditAttribution: KarenS commentedOK, just updated Views to the very latest -dev version and now I'm getting this error, too, so something changed in Views between the version I was using and the latest. I'll have to investigate.
Comment #9
KarenS CreditAttribution: KarenS commentedFound the change -- http://drupal.org/cvs?commit=120575 -- it specifically says it could impact Date and Calendar. Now I need to figure out what changes are needed :)
Comment #10
KarenS CreditAttribution: KarenS commentedI think I found all the fixes need for the Calendar module to adapt to that change in Views. I still need to look through the Date module to see what else might be affected there.
Comment #11
gvdvenis CreditAttribution: gvdvenis commentedwhere can we get the updates? are you planning on releasing an updated development version anytime soon?
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.