Shortcode error
-
Hi, I keep having an error messegare every 1-2 weeks in shortcodes.php :
/data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php fájl 130 sora egy E_ERROR típusú hibát okoz. Hibaüzenet: Uncaught Error: Call to undefined function sc_get_events_list() in /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php:130
Stack trace: 0 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(434): sc_events_list_shortcode(Array, ”, ‘sc_events_list’) 1 [internal function]: do_shortcode_tag(Array) 2 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\[(\[?)(sc_eve…’, ‘do_shortcode_ta…’,’WordPress 6.8.2
Sugar Calendar (Lite) (3.8.2)
PHP version: 8.4.12
I’m using this shortcode on my frontpage:
[sc_events_list display=”upcoming” order=by number=”6″ show_date=”yes” show_time=”yes”]
The page runs without a problem, there are no 500 errors, but the owner of the site is concerned. Can you advise me on this issue? Can I safely ignore it?
In the error logs I found a probable compatibility issue in the plugin named: Slim SEO (https://ww.wp.xz.cn/plugins/slim-seo/)-
This topic was modified 8 months, 1 week ago by
Attila Zoltán Kedei. Reason: Found a probable incompatibility with another plugin
The page I need help with: [log in to see the link]
-
This topic was modified 8 months, 1 week ago by
-
Hi @attilazkedei,
I ran a couple of tests on my end but couldn’t replicate the issue. Based on your update about the possible source of the conflict, I’ll keep the plugin active in my test environment to see if it occurs.
In the meantime, when the error comes up, does it disappear on its own, or are there extra steps you take to clear it?
However, I’d also recommend switching from the [sc_events_list] to the new [sugarcalendar_events_list] shortcode as outlined in the shortcode guide on displaying upcoming events.
Could you please try this and let me know how it goes.
Ok, but [sugarcalendar_events_list] is doing something different and I just want to have the original mechanism.
I just discovered, there’s a bigger problem when I have sugar calender lite and Slim SEO switched on. My pages menu gets scrambled.
You can try to recreate it the following way:
Have sugar calendar lite (3.9) and Slim SEO (4.6.2) (https://ww.wp.xz.cn/plugins/slim-seo/) both installed and turned on.
Have more than one page in the pages menu and the first page should contain [sc_events_list display=”upcoming” order=”DESC” number=”6″ show_date=”yes” show_time=”yes”] somewhere. I use the standard gutenberg editor.
In the meta desc. data column of the first list item, instead of showing the data there’s going to be an error message and no other pages will be listed afterwards.
This happens only with the [sc_events_list] shortcode, switching to [sugarcalendar_events_list] would solve it, I just need to figure it out how to make it a clean list without the mini tools.
I’m going to post this same issue on the other plugin’s support page as well.-
This reply was modified 8 months, 1 week ago by
Attila Zoltán Kedei. Reason: Wrong shortcode, but the outcome is the same
I also can’t create a new page if the plugin is activated (probably if I have an old shortcode on one of the pages, but I have so many that I could not test without them).
This is my last error message:
A(z) /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php fájl 130 sora egy E_ERROR típusú hibát okoz. Hibaüzenet: Uncaught Error: Call to undefined function sc_get_events_list() in /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php:130
Stack trace:
#0 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(434): sc_events_list_shortcode(Array, ”, ‘sc_events_list’)
#1 [internal function]: do_shortcode_tag(Array)
#2 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(sc_eve…’, ‘do_shortcode_ta…’, ‘
The new shortcode is not fit for me, it has english text in it and is not translated to my language and I can’t hide those with CSS either. Unless I make my own translation I cannot use the new shortcode, only the legacy one. If this can’t be solved I’ll have to switch to another calendar plugin.Hi @attilazkedei,
Thanks for the follow-up, I was able to replicate the issue with the latest version and I’ve looped in the dev team for further investigation. I’ll be in touch with an update on this soon.
Thanks for your patience in the meantime.
Hi @attilazkedei,
Thanks for your patience while we looked into this.
I got an update from the dev team, and they were able to replicate and fix the issue. Could you update to the latest version (3.9.1) and let me know how it goes?
Regarding the original concern on the shortcode, with the new shortcode option, you should be able to achieve a simple and minimal layout using the following shortcode.
[sugarcalendar_events_list display="plain" show_block_header="false" allow_user_change_display="false" show_filters="false" show_search="false" show_date_cards="false" show_descriptions="false" show_featured_images="false"]Would you mind testing it out once more and letting me know? If you’d like to further adjust or remove some of the other functions on the list, do let us know.
In case it helps to share, I also tested the setup using the legacy shortcode you had shared [sc_events_list display=”upcoming” order=by number=”6″ show_date=”yes” show_time=”yes”] and this worked as expected.
I’m looking forward to hearing from you.
After the update I can create new pages in the pages menu. Great!
But the page listing still gets blocked by an error caused by the old sc_ shortcode when Slim SEO is also present.
Maybe it’s not sugar calendar’s fault I don’t know, but are you going to take a look into that as well?
This is the full error stack:
Fatal error: Uncaught Error: Call to undefined function sc_get_events_list() in /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php:130 Stack trace: #0 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(434): sc_events_list_shortcode(Array, ”, ‘sc_events_list’) #1 [internal function]: do_shortcode_tag(Array) #2 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(sc_eve…’, ‘do_shortcode_ta…’, ‘<!– wp:group {…’) #3 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(26): do_shortcode(‘<!– wp:group {…’) #4 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(161): SlimSEO\MetaTags\Helper::normalize(‘<!– wp:group {…’) #5 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Data/Post.php(43): SlimSEO\MetaTags\Helper::truncate(‘<!– wp:group {…’) #6 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Data/Post.php(35): SlimSEO\MetaTags\Data\Post->get_auto_description() #7 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/vendor/elightup/slim-twig/src/Data.php(22): SlimSEO\MetaTags\Data\Post->__get(‘auto_descriptio…’) #8 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/vendor/elightup/slim-twig/src/Renderer.php(19): SlimTwig\Data::get(Object(SlimSEO\MetaTags\Data\Post), Array, ‘{{ post.auto_de…’) #9 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/vendor/elightup/slim-twig/src/Renderer.php(8): SlimTwig\Renderer::render_variable(‘post.auto_descr…’, Array) #10 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(157): SlimTwig\Renderer::render(‘{{ post.auto_de…’, Array) #11 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Helper.php(130): SlimSEO\MetaTags\Helper::render_dynamic_variables(‘{{ post.auto_de…’, 61, 0, Array) #12 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/Description.php(89): SlimSEO\MetaTags\Helper::render(‘{{ post.auto_de…’, 61) #13 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/slim-seo/src/MetaTags/AdminColumns/Post.php(34): SlimSEO\MetaTags\Description->get_rendered_singular_value(61) #14 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/class-wp-hook.php(324): SlimSEO\MetaTags\AdminColumns\Post->render(‘meta_descriptio…’, 61) #15 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #16 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #17 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-posts-list-table.php(1410): do_action(‘manage_page_pos…’, ‘meta_descriptio…’, 61) #18 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-list-table.php(1802): WP_Posts_List_Table->column_default(Object(WP_Post), ‘meta_descriptio…’) #19 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-posts-list-table.php(1444): WP_List_Table->single_row_columns(Object(WP_Post)) #20 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-posts-list-table.php(941): WP_Posts_List_Table->single_row(Object(WP_Post), 0) #21 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-posts-list-table.php(813): WP_Posts_List_Table->_display_rows_hierarchical(Array, 1, 200) #22 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-list-table.php(1712): WP_Posts_List_Table->display_rows() #23 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/includes/class-wp-list-table.php(1639): WP_List_Table->display_rows_or_placeholder() #24 /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-admin/edit.php(503): WP_List_Table->display() #25 {main} thrown in /data/0/1/01950f0a-65f9-480e-9064-1e094f1efb45/mvsz.eu/web/wp-content/plugins/sugar-calendar-lite/includes/themes/legacy/shortcodes.php on line 130
This error is being displayed on the pages menu, inside Slim SEO’s meta desc. column of the page where I use the old sc_ shortcode.
I have tried your suggestion, but this isn’t showing results, because my events are next month:[sugarcalendar_events_list display="plain" show_block_header="false" allow_user_change_display="false" show_filters="false" show_search="false" show_date_cards="false" show_descriptions="false" show_featured_images="false"]I have also tried fidgeting around with the gutenberg block:
“wp:sugar-calendar/event-list-block {“blockId”:”5480b8d3-43de-46f5-92f4-9ac1493a90d3″,”groupEventsByWeek”:false,”eventsPerPage”:6,”maximumEventsToShow”:6,”display”:”plain”,”showBlockHeader”:false,”allowUserChangeDisplay”:false,”showFilters”:false,”showSearch”:false,”showDateCards”:false,”showDescriptions”:false,”showFeaturedImages”:false,”accentColor”:”hsla(30, 56%, 71%, 1)”} –>
This is the closest to what I need, only this one has the date format:
2025.10.10. at 00:00 – 2025.10.11. at 00:00
There’s “at” before the time element which needs translation or a different date format. If I could add my own date format, that would solve my problem. Is that possible by chance? If not, I will create a quick translation and leave it at that.The matter got resolved, thanks for your quick help!
For anyone else who uses Slim SEO with sc_events_list shortcode, take a look at this thread:
https://ww.wp.xz.cn/support/topic/compatibility-issue-with-sugar-calendar-lite/
And the workaround here:
https://docs.wpslimseo.com/slim-seo/troubleshooting/ -
This reply was modified 8 months, 1 week ago by
The topic ‘Shortcode error’ is closed to new replies.