Answers.Body: <p>MySQL 8 isn't officially supported yet. This particular problem should be fixed in 5.23 though since it's the word "groups" that mysql 8 doesn't like - see <a href="https://lab.civicrm.org/dev/core/issues/1143" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues/1143</a> and the more general <a href="https://lab.civicrm.org/dev/core/issues/392" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues/392</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-13T22:55:14.773Z
Answers.Text: Thank you for the quick response.  I'll roll the environment back to the old stack and try again with 5.23.
Answers.UserDisplayName: Brendan Spaar
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-13T22:42:08.047Z
Answers.LastActivityDate: 2020-02-13T22:48:10.340Z
Answers.LastEditDate: 2020-02-13T22:48:10.340Z
Answers.UserDisplayName: Demerit
Body: <p>I may have done too many upgrades at once but I was really eager to upgrade my environment following the release of Civi 5.22.0.  I started out with upgrading my Civi Wordpress environment from 5.21.0 to 5.22.0.  I made a backup of my site and database on the old stack.  Then I upgraded my Bitnami stack to PHP 7.3.13 and Mysql 8.0.18.  I performed a data import into the Mysql 8.0 database and everything appeared fine on the surface.  </p>
  
  <p>Today I was trying to manage groups that were previously working under the old environment and received an Ajax error (see below).  I have tried deleting all of my groups per recommendations and this did not resolve the issue.  I believe that something may be incorrectly configured within PHP but I'm not sure what it could be.  Can anyone make sense of the error that I am receiving?</p>
  
  <p>Error that occurs when I click on Contacts > Manage Groups within CiviCRM for Wordpress:</p>
  
  <pre><code>DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7
  </code></pre>
  
  <p>Backtrace:</p>
  
  <pre><code>&lt;p&gt;backTrace&lt;/p&gt;&lt;p&gt;&lt;pre&gt;#0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
  #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR_Error-&amp;gt;__construct(&amp;quot;DB Error: syntax error&amp;quot;, -2, 16, (Array:2), &amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&amp;gt;__construct(-2, 16, (Array:2), &amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-&amp;gt;_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), &amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;, &amp;quot;DB_Error&amp;quot;, TRUE)
  #5 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR-&amp;gt;__call(&amp;quot;raiseError&amp;quot;, (Array:7))
  #6 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common-&amp;gt;raiseError(-2, NULL, NULL, &amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;, &amp;quot;1064 ** You have an error in your SQL syntax; check the manual that correspon...&amp;quot;)
  #7 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli-&amp;gt;mysqliRaiseError()
  #8 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli-&amp;gt;simpleQuery(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #9 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2416): DB_common-&amp;gt;query(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #10 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject-&amp;gt;_query(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #11 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(420): DB_DataObject-&amp;gt;query(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;)
  #12 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1419): CRM_Core_DAO-&amp;gt;query(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;, TRUE)
  #13 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(854): CRM_Core_DAO::executeQuery(&amp;quot;\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...&amp;quot;, (Array:11), TRUE, &amp;quot;CRM_Contact_DAO_Group&amp;quot;)
  #14 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(726): CRM_Contact_BAO_Group::getGroupList((Array:11))
  #15 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Group/Page/AJAX.php(52): CRM_Contact_BAO_Group::getGroupListSelector((Array:11))
  #16 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(234): CRM_Group_Page_AJAX::getGroupList()
  #17 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
  #18 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
  #19 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:3))
  #20 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress-&amp;gt;invoke(&amp;quot;&amp;quot;)
  #21 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(312): WP_Hook-&amp;gt;apply_filters(&amp;quot;&amp;quot;, (Array:1))
  #22 /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php(478): WP_Hook-&amp;gt;do_action((Array:1))
  #23 /opt/bitnami/apps/wordpress/htdocs/wp-admin/admin.php(254): do_action(&amp;quot;toplevel_page_CiviCRM&amp;quot;)
  #24 {main}
  </code></pre>
  
Tags: <groups><ajax><php7><datatables><mysql-8.0>
Title: Ajax error with Manage Groups after upgrading to PHP 7.3, MySQL 8.0 and 5.22.0
ThreadText: # Ajax error with Manage Groups after upgrading to PHP 7.3, MySQL 8.0 and 5.22.0
  
  (Asked by: username_0 on 2020-02-13)
  
  I may have done too many upgrades at once but I was really eager to upgrade my environment following the release of Civi 5.22.0.  I started out with upgrading my Civi Wordpress environment from 5.21.0 to 5.22.0.  I made a backup of my site and database on the old stack.  Then I upgraded my Bitnami stack to PHP 7.3.13 and Mysql 8.0.18.  I performed a data import into the Mysql 8.0 database and everything appeared fine on the surface.  
  Today I was trying to manage groups that were previously working under the old environment and received an Ajax error (see below).  I have tried deleting all of my groups per recommendations and this did not resolve the issue.  I believe that something may be incorrectly configured within PHP but I'm not sure what it could be.  Can anyone make sense of the error that I am receiving?
  Error that occurs when I click on Contacts > Manage Groups within CiviCRM for Wordpress:
  DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7
  
  Backtrace:
  backTrace#0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
  #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", "DB_Error", TRUE)
  #5 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
  #6 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-2, NULL, NULL, "\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
  #7 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
  #8 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #9 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2416): DB_common->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #10 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #11 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(420): DB_DataObject->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...")
  #12 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1419): CRM_Core_DAO->query("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", TRUE)
  #13 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(854): CRM_Core_DAO::executeQuery("\n        SELECT groups.*, createdBy.sort_name as created_by \n        FROM  ...", (Array:11), TRUE, "CRM_Contact_DAO_Group")
  #14 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Group.php(726): CRM_Contact_BAO_Group::getGroupList((Array:11))
  #15 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Group/Page/AJAX.php(52): CRM_Contact_BAO_Group::getGroupListSelector((Array:11))
  #16 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(234): CRM_Group_Page_AJAX::getGroupList()
  #17 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
  #18 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
  #19 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:3))
  #20 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress->invoke("")
  #21 /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
  #22 /opt/bitnami/apps/wordpress/htdocs/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
  #23 /opt/bitnami/apps/wordpress/htdocs/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
  #24 {main}
  
  **Tags:** groups, ajax, php7, datatables, mysql-8.0
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-13. Score: 1 | Accepted answer
  
  MySQL 8 isn't officially supported yet. This particular problem should be fixed in 5.23 though since it's the word "groups" that mysql 8 doesn't like - see <https://lab.civicrm.org/dev/core/issues/1143> and the more general <https://lab.civicrm.org/dev/core/issues/392>
  
  > **Comments:**
  > **username_0**: Thank you for the quick response.  I'll roll the environment back to the old stack and try again with 5.23.  
  
  ---
  
  