sergant210 / myCalendar

MODX Extra based on javascript plugin fullCalendar
10 stars 7 forks source link

TypeError error when adding events to myCalendar #15

Open varalmious opened 3 years ago

varalmious commented 3 years ago

Hi I saw that myCalendar can add events here https://modzone.ru/mycalendar.html

However on my development site when pressing "Add" in event dialog, I get the error at the end of the message. The error stops anything like new rendering on the client side, but a refresh reveals that the event was added, so only repaint failed.

This is with MODX2.7.3 and PHP7.4, but it works with MODX2.5.0 and PHP5.6.

Thanks for any support, almo

Uncaught TypeError: a.start is undefined v https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 u https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 t https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 s https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 p https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 fullCalendar https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 jQuery 2 fullCalendar https://www....com/assets/components/mycalendar/js/fullcalendar.min.js:6 success https://www....com/assets/components/mycalendar/js/default.js:319 jQuery 6 save https://www....com/assets/components/mycalendar/js/default.js:305 click https://www....com/assets/components/mycalendar/js/default.js:193 jQuery 26

varalmious commented 3 years ago

Did the same in Chrome and developer tools did reveal some more information as you can see from here:

fullcalendar.min.js:6 Uncaught TypeError: Cannot read property 'stripTime' of undefined at v (fullcalendar.min.js:6) at u (fullcalendar.min.js:6) at t (fullcalendar.min.js:6) at s (fullcalendar.min.js:6) at Pa.p [as renderEvent] (fullcalendar.min.js:6) at HTMLDivElement. (fullcalendar.min.js:6) at Function.each (jquery.min.js:2) at n.fn.init.each (jquery.min.js:2) at n.fn.init.a.fn.fullCalendar (fullcalendar.min.js:6) at Object.success (default.js:319)

sergant210 commented 3 years ago

Hello, Check your javascript scripts. Maybe you call 2 jQuery instances?

varalmious commented 3 years ago

Hello, Thanks for the hint.

To rule that out, installed only MODX on a dedicated server, with MODX2.5.0, PHP5.6, added only myCalendar, it worked, then upgraded with SiteDash to MODX2.7.3 and PHP7.4.5. MODX and page works. But myCalendar not. Again Chrome hints to error above. Behaviour as described above.

you can have a look here: ...

varalmious commented 3 years ago

Hello, just thought rolling back one at the time.... and found PHP to be the culprit: myCalendar works with PHP 7.0.33, but stops to work with PHP 7.1.33. Do make the difference even no page reload is required, with 7.0 on the backend it works, with 7.1 it doesn't work any more. So looks like it is something in the server call from the client.

sergant210 commented 3 years ago

Hello, Thanks for debugging. I'll check it.

varalmious commented 3 years ago

Hello, your welcome, however debugging I just knocked out the dummy installation, sorry. And thanks for checking, have a good time