Hi guys, is you google calendar pro / full calendar licence still valid?
if not that will be the cause. The latest version of simple calendar uses a different way to include the google API’s, its better because it means the plugin will no longer conflict with many other plugins.
Look at the top of
/wp-content/plugins/simple-calendar-google-calendar-pro/includes/feeds/google-pro.php
what are the “use” lines?
If you have the latest version they should be something like
namespace SimpleCalendar\Feeds;
use SimpleCalendar\plugin_deps\Google\Service\Exception;
use SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry;
use SimpleCalendar\plugin_deps\Google_Service_Calendar_Event;
use SimpleCalendar\plugin_deps\Google_Service_Calendar_EventAttachment;
use SimpleCalendar\plugin_deps\Google_Service_Calendar_EventAttendee;
use SimpleCalendar\plugin_deps\Google_Service_Calendar_EventCreator;
use SimpleCalendar\plugin_deps\Google\Google_Service;
use SimpleCalendar\plugin_deps\Google_Service_Calendar;
use SimpleCalendar\plugin_deps\Google_Service_Drive;
use SimpleCalendar\plugin_deps\Google_Client;
use SimpleCalendar\plugin_deps\Carbon\Carbon;
use SimpleCalendar\Abstracts\Calendar;
use SimpleCalendar\Feeds\Admin\Google_Pro_Admin;
@mickwall:
I haven’t entered any licence, not using pro, just the regular version. And it stopped working.
-
This reply was modified 4 years, 9 months ago by
flips01.
Thanks
Yours is an easy fix
Change
$markdown = new \Parsedown();
to
$markdown = new Parsedown();
in file
/home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php
at Line 673
and that should fix it
@mickwall wrote:
> Yours is an easy fix […]
Ok, thanks!
So if I re-upgrade to v3.1.36 and change that. It will not break again when v3.1.37 comes around?
(I won’t have to fix it every time?) π
You might until they fix it properly – I have submitted this fix to github so they just need to pick it up before the next release
Thank you, @mickwall! π
I was about to implement your fix now, so I re-upgraded the plugin to 3.1.36, and I was ready to make the change in line 673.
But for some reason it did not break this time … Everything just works. π
(I didn’t make any changes, so either my webhost did something, or BeTheme updated something.)
It will be down to data in your Google calendar, I guess there must be something that will trigger it. The line is wrong so if you do see a crash at some point try the fix and let me know.
@mickwall I added a calendar event today. Clear cache and refresh made the same exact error at line 673 appear. I removed the backslash, but still it failed:
2021-06-12 15:48:18.187823 [NOTICE] [1114281] [T0] [185.14.17.230:60205#APVH_www.mydomain.tld:443] [STDERR] nu/public_html/wp-content/plugins/google-calendar-events/includes/shortcodes.php(72): SimpleCalendar\Abstracts\Calendar->html()
#12 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(343): SimpleCalendar\Shortcodes->print_calendar()
#13 [internal function]: do_shortcode_tag()
#14 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(218): preg_replace_callback()
#15 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-items.php(226): do_shortcode()
#16 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(526): Mfn_Builder_Items::item_column()
#17 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/page.php(26): Mfn_Builder_Front->show()
#18 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/template-loader.php(106): include('/home/mydomain/dom...')
#19 /home/mydomain/domains/mydomain.tld/public_html/wp-blog-header.php(19): require_once('/home/mydomain/dom...')
#20 /home/mydomain/domains/mydomain.tld/public_html/index.php(17): require('/home/mydomain/dom...')
#21 {main}
thrown in /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php on line 673
Cheers @flips01 Any more info in the logs at all – that doesnt say “fatal error” and the error
Uncaught Error: Class “Parsedown”
is not there so we have changed something!
th elog didn’t help me this time so be good if you can find something else?
Hm, ok, trying again to reproduce and catch only the relevant log, and the full log.
(Sorry for being too quick/sloppy in my previous post.)
The change is done:
$ grep -ri Parsedown google-calendar-events
google-calendar-events/includes/events/event-builder.php: $markdown = new Parsedown();
Error_log from the entry:
2021-06-12 19:41:44.224538 [NOTICE] [1422006] [T0] [1.2.3.4:41911#APVH_www.mydomain.tld:443] [STDERR] PHP Fatal error: Uncaught Error: Class "SimpleCalendar\Events\Parsedown" not found in /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php:673
Stack trace:
#0 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(284): SimpleCalendar\Events\Event_Builder->get_description()
#1 [internal function]: SimpleCalendar\Events\Event_Builder->process_event_content()
#2 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(238): preg_replace_callback()
#3 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php(753): SimpleCalendar\Events\Event_Builder->parse_event_template_tags()
#4 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(406): SimpleCalendar\Abstracts\Calendar->get_event_html()
#5 [internal function]: SimpleCalendar\Events\Event_Builder->process_event_content()
#6 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php(238): preg_replace_callback()
#7 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php(753): SimpleCalendar\Events\Event_Builder->parse_event_template_tags()
#8 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-list.php(660): SimpleCalendar\Abstracts\Calendar->get_event_html()
#9 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-list.php(228): SimpleCalendar\Calendars\Views\Default_Calendar_List->draw_list()
#10 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php(847): SimpleCalendar\Calendars\Views\Default_Calendar_List->html()
#11 /home/mydomain/domains/mydomain.
2021-06-12 19:41:44.224557 [NOTICE] [1422006] [T0] [1.2.3.4:41911#APVH_www.mydomain.tld:443] [STDERR] nu/public_html/wp-content/plugins/google-calendar-events/includes/shortcodes.php(72): SimpleCalendar\Abstracts\Calendar->html()
#12 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(343): SimpleCalendar\Shortcodes->print_calendar()
#13 [internal function]: do_shortcode_tag()
#14 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(218): preg_replace_callback()
#15 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-items.php(226): do_shortcode()
#16 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(526): Mfn_Builder_Items::item_column()
#17 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/page.php(26): Mfn_Builder_Front->show()
#18 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/template-loader.php(106): include('/home/mydomain/dom...')
#19 /home/mydomain/domains/mydomain.tld/public_html/wp-blog-header.php(19): require_once('/home/mydomain/dom...')
#20 /home/mydomain/domains/mydomain.tld/public_html/index.php(17): require('/home/mydomain/dom...')
#21 {main}
thrown in /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/events/event-builder.php on line 673
That’s all.
(Reverted back to previous version again, to keep the site working.)
Cool, thats the error I thought you might get –
Can you download and try this version – you will have to just unpack over the existing directory in the plugins directory.
https://1drv.ms/u/s!As4SjpxYqQN_gcRVZpc5J97vvaoAmQ?e=06nN2W
Basically when I have changed the plugin to namespace (make unique versions) of all the 3rd party code I’ve missed adding Parsedown, this version adds it back in the new way.
Sorry for the trouble
-
This reply was modified 4 years, 9 months ago by
mickwall.
Thanks for the effort, @mickwall! π
Rename of directory from google-calendar-events to Simple-Calendar intentional?
Had to name it google-calendar-events to make it work.
(The version also is not updated: “version”: “3.1.35”)
Anyways, this is the errors I got with this version:
2021-06-13 17:45:01.937217 [NOTICE] [2217955] [T0] [1.2.3.4:53504-H3:8E6510-156#APVH_www.mydomain.tld:443] [STDERR] PHP Fatal error: Uncaught Error: Class "Carbon\Carbon" not found in /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-list.php:257
Stack trace:
#0 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-list.php(530): SimpleCalendar\Calendars\Views\Default_Calendar_List->get_events()
#1 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/calendars/views/default-calendar-list.php(228): SimpleCalendar\Calendars\Views\Default_Calendar_List->draw_list()
#2 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/abstracts/calendar.php(847): SimpleCalendar\Calendars\Views\Default_Calendar_List->html()
#3 /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-calendar-events/includes/shortcodes.php(72): SimpleCalendar\Abstracts\Calendar->html()
#4 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(343): SimpleCalendar\Shortcodes->print_calendar()
#5 [internal function]: do_shortcode_tag()
#6 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/shortcodes.php(218): preg_replace_callback()
#7 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-items.php(226): do_shortcode()
#8 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(526): Mfn_Builder_Items::item_column()
#9 /home/mydomain/domains/mydomain.tld/public_html/wp-content/themes/betheme/page.php(26): Mfn_Builder_Front->show()
#10 /home/mydomain/domains/mydomain.tld/public_html/wp-includes/template-loader.php(106): include('/home/mydomain/dom...')
#11 /home/mydomain/domains/mydomain.tld/public_html/wp-blog-header.php(19): require_once('/home/mydomain/dom...')
#12 /home/mydomain/domains/mydomain.tld/public_html/index.php(17): require('/home/mydomain/dom...')
#13 {main}
thrown in /home/mydomain/domains/mydomain.tld/public_html/wp-content/plugins/google-cal
2021-06-13 17:45:01.937240 [NOTICE] [2217955] [T0] [1.2.3.4:53504-H3:8E6510-156#APVH_www.mydomain.tld:443] [STDERR] endar-events/includes/calendars/views/default-calendar-list.php on line 257
… I think. Did a quick capture before reverting to working plugin. π
Hey, Thanks.
Can you download it again (Same link – I’ve made a change) and see how it goes. Also can you describe what the google event looks like, the content etc so I can test this locally rather than keep guessing!
Thanks again @mickwall! It seems like this last version fixed the issue! π
My calendar event that broke stuff looks like this:
Title: Test Event (test ΓΓΓ
)
Date: tirsdag 15. juni kl. 11:00 (formatted to Norwegian locale)
Address/location: Adresse
Notes:
Lots of nice description text, using æøΓ₯ and (parenthesis) etc. Jau, jau … Lots of nice description text, using æøΓ₯ and (parenthesis) etc. Jau, jau …
Hope that helps. Let me know if I can help further, and thanks again! π
-
This reply was modified 4 years, 9 months ago by
flips01.
-
This reply was modified 4 years, 9 months ago by
flips01. Reason: Typo