help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Picture to Event Upload = ERROR 0 Call to a member function format() on bool

Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago - 1 year 9 months ago
#30531
Hello Developer
Since im now testing im found an new Error: Picture to Event
Frontend, logged in als Administrator / or Superuser:
I Try to ad an Image to Event (Only Upload Possible, no selection from Server Folder) ERROR 0 Call to a member function format() on bool. Also the Event stay than status Checked out. File is not not Uploaded to Server Folder (images/jem/events/).
Also when i delet the existing Picture in Frontend and save: Same error occurs, when i check in the Backend, the Picture still there as Picture to event...

However, in the Backend this Works iam Able to Upload as well to have the Server File selection..
Only thing is then, when i add succesfully the Picture, in the Frontend i see the Thumb, when i click on it it open in same Page, better new page or even a Popup with Close Button would be helpfull

Best Regards, Marcel
Last edit: 1 year 9 months ago by pctech.

Please Log in or Create an account to join the conversation.

Re: Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago - 1 year 9 months ago
#30542
Thank you Marcel, this is a bug I know, it happens only in some sites, and we don't know in which conditions this happens: it even happens in this sites, when you open an existing event, changes nothing and try then to save! It is only in edit event, in edit venue, this is not a problem!
@all: if someone can reproduce and knows a solution, we would be very happy.
[personally I suspect, it has to do with the date!]
Last edit: 1 year 9 months ago by jojo12.

Please Log in or Create an account to join the conversation.

Re: Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago - 1 year 9 months ago
#30558
Hello forumIt seems that this error only occurs with existing events (in the FRONTEND). If I create a new event and attach an image and files as described, it works perfectly.I can then also edit this new event, for example remove and add the image or files again or just save again without changes, everything works.Attached is the SQL_JEM_EVENT data ID32 (new event) ID27old entry which then causes the error...

File Attachment:

File Name: xxx_jem_events.txt
File Size:6 KB


Maybe the experienced eye can see where the error can be?
I Check now manually the difference...
Code:
What I notice in the SQL data: (OLD = ID27 / NEW ID32) recurrence_limit_date: OLD is: Without a tick for the date and entry is: 0000-00-00 / for NEW with a tick and without content This seems only to be addet after saving, modify in Backend? metadata: old with {"robots":"","author":"","rights":""} for new = EMPTY attribs: ALT: {"event_show_author":"","event_link_author":"","event_show_contact":"","event_link_contact":"","event_show_hits":"","event_show_print_icon":"","event_show_email_icon" :"","event_show_ical_icon":"","event_show_detailstitle":"","event_show_locdescription":"","event_show_detailsadress":"","event_show_detlinkvenue":"","event_show_mapserv":"","event_tld": "","event_lg":"","event_comunsolution":"","event_comunoption":"","event_show_description":""} / for NEW it is EMPTY
Last edit: 1 year 9 months ago by pctech. Reason: News

Please Log in or Create an account to join the conversation.

Re: Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago - 1 year 9 months ago
#30559
OK I Found out: When i change in the DB to Event
recurrence_limit_date: Set Tick on DATE and Save, then everything works fine!!

Change in DB all to NULL
Code:
XXXX is Your DB Prefix! UPDATE `XXXX_jem_events` SET `recurrence_limit_date` = NULL
Last edit: 1 year 9 months ago by pctech.

Please Log in or Create an account to join the conversation.

Re: Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago - 1 year 9 months ago
#30571
OK, that is strange.
During the installtaion the recurrence_limit_date should already be set to NULL.
See in install.mysql.utf8.sql
Code:
`recurrence_limit_date` date NULL DEFAULT NULL,
Ist the DB from an update or an import from an older JEM version?
In JEM 3 it was 0000-00-00, in JEM 4 it is NULL
Last edit: 1 year 9 months ago by hekla.

Please Log in or Create an account to join the conversation.

Re: Picture to Event Upload = ERROR 0 Call to a member function format() on bool

1 year 9 months ago
#30572
@pctech
I remember that you previous JEM was 3.x (not stable version and not support to migration script).
I see in the table that you have a datetime value with '000-00-00 ...', this isn't supported to PHP8 and Joomla 4. I think that this is your main problem.
We are going to clean these values and convert to null when their values are '000-00-00...'

You could run this script in your sql , change xxxxx for your Joomla prefix in DB:
Code:
UPDATE `xxxxx_jem_categories` SET `modified_time` = null WHERE `modified_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_categories` SET `checked_out_time` = null WHERE `checked_out_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_categories` SET `created_time` = now() WHERE `created_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_events` SET `created` = now() WHERE `created` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_events` SET `modified` = null WHERE `modified` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_events` SET `checked_out_time` = null WHERE `checked_out_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_groups` SET `checked_out_time` = null WHERE `checked_out_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_venues` SET `created` = now() WHERE `created` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_venues` SET `modified` = null WHERE `modified` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_venues` SET `checked_out_time` = null WHERE `checked_out_time` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_venues` SET `publish_up` = null WHERE `publish_up` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_venues` SET `publish_down` = null WHERE `publish_down` LIKE '%0000-00-00%'; UPDATE `xxxxx_jem_attachments` SET `added` = null WHERE `added` LIKE '%0000-00-00%';

And we know that view of submit event need a design review:
- Popup for the image (with BT5 use a div tie class="lightbox")
- Add tab to attach file.
- Add image selects from the server.
- Improve the recurring events.
But the main objective of version 4.0.0 was support Joomla 4 with PHP8, and migration data from JEM 2.x.
All suggestions, bug reports and ideas, all of them are welcome to next version of JEM.
We take note.Thanks for your test and repost in the forum, help us.

Tell me if your JEM is going best with these UPDATEs

Please Log in or Create an account to join the conversation.

Time to create page: 0.643 seconds