4

I installed the Event Calendar extension on a Wordpress (5.7.2) site with CIVICRM 5.37.2. I followed the installation instructions and added the [event_calendar component="event-calendar" id="<>"] in my page. When rendering the page, I get a database error (see below). Does anyone know what I did wrong?

 Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: syntax error


Error Field Error Value
Type    DB_Error
Code    -2
Message DB Error: syntax error
Mode    16
UserInfo    SELECT * FROM civicrm_event_calendar WHERE `id` = <>; [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<>' at line 1]
DebugInfo   SELECT * FROM civicrm_event_calendar WHERE `id` = <>; [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<>' at line 1]
PEAR_Exception: DB Error: syntax error in C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php on line 922
- DB_Error: DB Error: syntax error in unknown on line unknown
Exception trace
#   Function    Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php:922
1   PEAR_Error->__construct('DB Error: syntax…', -2, 16, Array, 'SELECT * FROM ci…')    C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\db\DB.php:997
2   DB_Error->__construct(-2, 16, Array, 'SELECT * FROM ci…')   C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php:575
3   PEAR::_raiseError(Object(DB_mysqli), null, -2, 16, Array, 'SELECT * FROM ci…', 'DB_Error', true)    C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php:223
4   PEAR->__call('raiseError', Array)   C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\db\DB\common.php:1928
5   DB_common->raiseError(-2, null, null, 'SELECT * FROM ci…', '1064 ** You have…') C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\db\DB\mysqli.php:936
6   DB_mysqli->mysqliRaiseError()   C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\db\DB\mysqli.php:406
7   DB_mysqli->simpleQuery('SELECT * FROM ci…') C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\vendor\pear\db\DB\common.php:1234
8   DB_common->query('SELECT * FROM ci…')   C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\packages\DB\DataObject.php:2696
9   DB_DataObject->_query('SELECT * FROM ci…')  C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\packages\DB\DataObject.php:1829
10  DB_DataObject->query('SELECT * FROM ci…')   C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\CRM\Core\DAO.php:454
11  CRM_Core_DAO->query('SELECT * FROM ci…', true)  C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\CRM\Core\DAO.php:1566
12  CRM_Core_DAO::executeQuery('SELECT * FROM ci…') C:\xampp\htdocs\en\media\civicrm\ext\com.osseed.eventcalendar\CRM\EventCalendar\Page\ShowEvents.php:184
13  CRM_EventCalendar_Page_ShowEvents->_eventCalendar_getSettings() C:\xampp\htdocs\en\media\civicrm\ext\com.osseed.eventcalendar\CRM\EventCalendar\Page\ShowEvents.php:51
14  CRM_EventCalendar_Page_ShowEvents->run(Array, null) C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php:313
15  CRM_Core_Invoke::runItem(Array) C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php:69
16  CRM_Core_Invoke::_invoke(Array) C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm\CRM\Core\Invoke.php:36
17  CRM_Core_Invoke::invoke(Array)  C:\xampp\htdocs\en2\wp-content\plugins\civicrm\civicrm.php:1172
18  CiviCRM_For_WordPress->invoke() C:\xampp\htdocs\en2\wp-content\plugins\wordpress-event-calendar\wordpress-event-calendar.php:131
19  event_calendar_shortcode_handler(Array, '', 'event_calendar')   C:\xampp\htdocs\en2\wp-includes\shortcodes.php:343
20  do_shortcode_tag(Array) unknown:unknown
21  preg_replace_callback('/\[(\[?)(event_c…', 'do_shortcode_tag', '[event_calendar …') C:\xampp\htdocs\en2\wp-includes\shortcodes.php:218
22  do_shortcode('[event_calendar …')   C:\xampp\htdocs\en2\wp-includes\class-wp-hook.php:292
23  WP_Hook->apply_filters('[event_calendar …', Array)  C:\xampp\htdocs\en2\wp-includes\plugin.php:212
24  apply_filters('the_content', '[event_calendar …')   C:\xampp\htdocs\en2\wp-includes\post-template.php:253
25  the_content('<span class="fa …')    C:\xampp\htdocs\en2\wp-content\themes\free-template\template-parts\post\content.php:17
26  require('C:\xampp\htdocs\…')    C:\xampp\htdocs\en2\wp-includes\template.php:732
27  load_template('C:\xampp\htdocs\…', false, Array)    C:\xampp\htdocs\en2\wp-includes\template.php:676
28  locate_template(Array, true, false, Array)  C:\xampp\htdocs\en2\wp-includes\general-template.php:204
29  get_template_part('template-parts/p…', '')  C:\xampp\htdocs\en2\wp-content\themes\free-template\index.php:31
30  include('C:\xampp\htdocs\…')    C:\xampp\htdocs\en2\wp-includes\template-loader.php:106
31  require_once('C:\xampp\htdocs\…')   C:\xampp\htdocs\en2\wp-blog-header.php:19
32  require('C:\xampp\htdocs\…')    C:\xampp\htdocs\en2\index.php:17
33  {main}
3

Welcome to SE!

In this: [event_calendar component="event-calendar" id="<>"] the <> should be replaced by a number - eg id="1"

3
  • hey AIdan - maybe give their Q a +1 as newbie in need of points.
    – petednz - fuzion
    Jul 8 at 22:41
  • Pete - yes, done!
    – Aidan
    Jul 9 at 9:40
  • It worked beautifully. Thank you very much!
    – G.M.
    Jul 10 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.