jemproject / JEM-Project

JEM - an Event Manager for Joomla
https://www.joomlaeventmanager.net
GNU General Public License v3.0
25 stars 37 forks source link

Frontend Edit event: "Call to a member function format() on bool" if you use not english (date) #1590

Closed jojo12 closed 1 year ago

jojo12 commented 1 year ago

I have 2 sites which work and 2 sites which give always this error, when trying to save in editevent (even when I don't change anything). Error and then it is checked out. Even as superuser. Editvenue is working fine. I can't find more infos.

jojo12 commented 1 year ago

Finally found the conditions, when ERROR happens: if you use german language (perhaps others too) If you use english --> there are no problems! So it should be the translation problem between german and DB entry EDIT: I had this problem on a xampp localsite Now I changed from german to english. No error comes. (I don't know, if the problem is solved, when once changing?) I have working sites which are in german! EDIT2: I tried again: when frontend is english, no error; when frontend is german,error

jojo12 commented 1 year ago

It seems to be a problem in other languages too: there's a post about the same problem in hungarian language!

jojo12 commented 1 year ago

I had this error just now, when language is other than english! I changed then to english, and the problem disappeared. [I am quite sure, it has to do with the different datetime settings]

jojo12 commented 1 year ago

My question: is there a problem with different datetime format between english and other languages? In which files is this changement?

jojo12 commented 1 year ago

At least we can give the hint: when you have problems saving settings you make in frontend, then change to english!

mckillo commented 1 year ago

One question: Do you install the German Language for JEM4 or only change the language in Joomla?

jojo12 commented 1 year ago

Both

mckillo commented 1 year ago

I have loaded the com_jem.ini for front and back in de-D, and edit an event from front and back, modified the date, save y nothing. No errors. You can send a zip with the JEM language folder of front and back, to test it. Send me PM a video with the error (how to simulate),

jojo12 commented 1 year ago

JEM_language.zip to reproduce: I go to Joomla>System>Languages site=german admin=german and save. I go to JEM frontend, login, I open an existing event>edit. I can let it like that and trying to save or change something and then save --> the error is there [in english the hint for dateformat is 2017-12-31, in german the hint for dateformat is 31.12.2017, where in the frontend is this changing?]

jojo12 commented 1 year ago

it would be interesting which languages beneath german and hungarian have this problem too?

mckillo commented 1 year ago

I did this operation, and It works. I think that it could be any string of languages (translation). Could you attach your language files (front and back)? And one more: you can set the debug system in Joomla, generate the error, and send the screen capture.

jojo12 commented 1 year ago

I attched the language filec before, did you not ee the zip?

jojo12 commented 1 year ago

With debug I don?t get any infos

mckillo commented 1 year ago

Sorry, I don't see it. When I'll return home this night, I'll test it again. Thanks

jojo12 commented 1 year ago

I'll send you a pm with a link and a whatsapp with a pw

mckillo commented 1 year ago

@jojo Thanks, so, I have can to debug it.

I detected that I don't have the update for this field. That's the problem. When you have a recurrence event, the new recurrent events have the finish date in this field. In this case, the value is the recurrence_limit_date of the root event (defined when the user creates the first event of the recurrence).

For the moment the first solution is run this sql script in your DB: UPDATEkpb_jem_eventsSETrecurrence_limit_date= null WHERErecurrence_limit_dateLIKE '%0000-00-00%';

It should work; for the moment, it's the first part of the solution, but the recurrence management is something we have to review.

The second part is developing a tool for housekeeping called "Recover Recurrence" (Ide, low proirity). I have to see if I can recover the link with the root father (finish date).

The third part will be to improve the recurrence feature of events (to the edit, because the recurrence loses it).

Let's, in the afternoon, I'll add new lines to the 4.0.1.sql (update patch with it) with a new commit.

jojo12 commented 1 year ago

I was able to change it with your UPDATEww84i_jem_eventsSETrecurrence_limit_date= null WHERErecurrence_limit_dateLIKE '%0000-00-00%';

jojo12 commented 1 year ago

I made a new zip and installed over, works fine!

jojo12 commented 1 year ago

But e.g. on demo.joomlaeventmanager.net there was just a requestanswer, so I get

Warnung JInstaller: :Install: SQL-Fehler Duplicate column name 'requestanswer' Installation der Erweiterung abgebrochen. Paket Update: Bei der Installation der Erweiterung trat ein Fehler auf: com_jem.zip then I have to delete it manually in DB

jojo12 commented 1 year ago

Thankyou @Heklaterriol so, I think it is better to go back here (we know, we can save when we are in english language!) and the normal way in admin is back!

mckillo commented 1 year ago

Sorry, why do we have to go back? Do we debug it? The real issue is #1643, right? If it's so, let's me try to debug it the case (1 day). I prefer to debug (first) instead (search solution) of go back. If there are an error, we have to find it.

Heklaterriol commented 1 year ago

Yes, I agree with mckillo. Fixing may sometimes create new bugs -- that's normal -- so let's fix them too.

Heklaterriol commented 1 year ago

@jojo12 did you check this? Is it fixed too? see #1643?

mckillo commented 1 year ago

I think that you can closed too.

jojo12 commented 1 year ago

I installed jem 4.1.0 on joomla 4.3.4 on php 8.2.4 xampp. this issue is back! I tested with the jem_demo plugin. Is it possible that we have to adapt this plugin, because this is programmed for recurrent events?

jojo12 commented 1 year ago

I tested now without plg_jem_demo. No errors. So,I will create a new issue.