unionco / calendarize

Calendar Field Type for CraftCMS
MIT License
18 stars 15 forks source link

Error: Call to a member function setTime() on boolean #42

Open alexr8 opened 5 years ago

alexr8 commented 5 years ago

I created an event, repeating weekly on a monday, starting a week in the future. Saved it, all good. I went back to view the entry in the admin, and got the following error:

Error: Call to a member function setTime() on boolean

From then on i had to delete the entry, as i couldn't access it in the admin. Devmode is on, calendarize version 1.2.16.

Unfortunately i can't recreate it at this stage, but i've included a screenshot of the error in case anything jumps out at you or someone else reports a similar issue. image

j-greig commented 5 years ago

We have the exact same bug/error. Not able to pinpoint the cause yet but it's broken the events section of a website so also keen to find a fix. Thank you! (wondering if it might be related to daylight savings as this kicked in for the UK recently)

fvaldes33 commented 5 years ago

@alexr8 @j-greig Looks like the start date is a boolean and not a date time instance. I will look into this and provide a fix. Can you send me any more information about your environment? Locale, timezone, etc.

alexr8 commented 5 years ago

I'm running vagrant Homestead on my local machine, PHP 7.2, timezone of Homestead is UTC, looks like timezone of the craft install is UTC-8 Los Angeles (although this should be UK time which i have now changed).

adamgarscadden commented 5 years ago

I'm working with @j-greig on this issue. The bug is happening for us on the latest version of Craft, PHP version 7.1.30 and MySQL 5.7.27. Let me know if you need any more info. Thanks!

j-greig commented 4 years ago

Hello! Is there any update on this bug? Cheers.

gglnx commented 4 years ago

We got the same problem. Records with this probleme have in the column exceptions as value {"date":null,"timezone":null} and timeChanges as value {"date":null,"timezone":null,"time":null}. Setting both values to [] fixes it.

PHP 7.3.12, MySQL 5.5.5, Craft CMS 3.3.18.1

j-greig commented 4 years ago

Hello again - is there a rough timeframe for fixing this please? We have had to half-disable our clients events section.

fvaldes33 commented 4 years ago

@j-greig Is possible to get a copy of your database? (If that isn't possible, maybe just a copy of your calendarize table should work) I am working with a fresh install and plugin store installed Calenderize. Everything seems to be working. I have tested with and without both date exceptions and date time exceptions. Also not seeing what @gglnx is seeing with the column records {"date":null,"timezone":null}, I am just seeing [] which is correct.

afairhurst commented 4 years ago

Hi, I've just encountered this issue today. Looking into it now.

mckenzieclark commented 5 months ago

This error has occurred, with the problem data in the exceptions and timeChanges columns being {"date":null,"timezone":"2024-06-20 05:15:22"} and {"date":null,"timezone":"2024-06-20 05:15:22","time":null} respectively.

Craft - 4.10.2 Calendarlize - 2.0.0

This occurred on an entry save, but replicating the issue seems to be near impossible. Was this addressed in any way back in 2020?