Answers.Body: <p>This error is related to the CiviMobile extension - you can see it mentioned in the backtrace, and the table with the error, <code>civicrm_contact_push_notification_messages</code>, is created by the CiviMobile extension.</p>
  
  <p>The error is that there's a field in that database table which is missing called <code>data</code>.  I can see from the <a href="https://github.com/agiliway/com.agiliway.civimobileapi/blob/5d5c08fd7d564dc07e6ac5a10d48b2a8ceb5048f/CRM/CiviMobileAPI/Upgrader.php#L83" rel="nofollow noreferrer">CiviMobile source code</a> that this field was added with Version 5.0.  Is it possible that you installed the upgrade but didn't run the database upgrade?  Go to <strong>Administer menu » Administration Console » System Status</strong> and see if there's a message telling you to run the database upgrades.</p>
  
  <p>If the database upgrade ran but failed, you might be in your current situation.  In that case, you'll need to run the following query on your MySQL database.  I copied the query from the link above, which is the upgrade code.</p>
  
  
  
  <pre><code>ALTER TABLE civicrm_contact_push_notification_messages ADD data varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
  </code></pre>
  
  <p>UPDATE: Based on the comments below, it seems clear that the issue is with <code>log_civicrm_contact_push_notification_messages</code>, not <code>civicrm_contact_push_notification_messages</code>.  This is a bug in the CiviMobile upgrade routine (though a common one).  The trick is to run <code>CRM_Logging_Schema-&gt;fixSchemaDifferences</code>.  The easiest way to do this is to install or enable an extension that's not currently installed; you can uninstall it immediately afterward.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-02T20:32:39.287Z
Answers.Text: Thanks @Jon G - Megaphone Tech for your quick answer. I had a look at the SQL table and the `Data` field is allready there. Nevertheless I ran the SQL command. But it just confirmed that the field is existing.
  `Requête SQL :
  
  ALTER TABLE civicrm_contact_push_notification_messages ADD data varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
  
  MySQL a répondu : Documentation
  #1060 - Nom du champ 'data' déjà utilisé`
  What can I look at now to try and solve this issue ?
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-02T22:29:55.307Z
Answers.Text: @WebmasterduBouclier Do you have advanced logging turned on?  If so, can you see if `log_civicrm_contact_push_notification_messages`is missing the `data` field?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T17:59:11.030Z
Answers.Text: Hi @Jon G - Megaphone Tech. 
  I ran the following SQL command ``show create table log_civicrm_contact_push_notification_messages``
  Here's the result :
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T17:59:39.513Z
Answers.Text: ``CREATE TABLE `log_civicrm_contact_push_notification_messages` (
   `id` int(10) unsigned DEFAULT NULL,
   `contact_id` int(10) unsigned DEFAULT NULL,
   `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `entity_id` int(11) DEFAULT NULL,
   `send_date` timestamp NULL DEFAULT NULL,
   `is_read` tinyint(4) DEFAULT '0',
   `invoke_contact_id` int(10) unsigned DEFAULT NULL,
   `message_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `log_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,``
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T17:59:54.790Z
Answers.Text: ``
   `log_conn_id` varchar(17) COLLATE utf8_unicode_ci DEFAULT NULL,
   `log_user_id` int(11) DEFAULT NULL,
   `log_action` enum('Initialization','Insert','Update','Delete') COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci``
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T18:01:35.370Z
Answers.Text: And for total information the same on ``show create table civicrm_contact_push_notification_messages;`` gives
  ``CREATE TABLE `civicrm_contact_push_notification_messages` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `contact_id` int(10) unsigned NOT NULL,
   `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `entity_id` int(11) DEFAULT NULL,
   `send_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
   `is_read` tinyint(4) DEFAULT '0',
  ``
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T18:01:52.987Z
Answers.Text: `` `invoke_contact_id` int(10) unsigned DEFAULT NULL,
   `message_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `data` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `FK_civicrm_contact_push_notification_message` (`contact_id`),
   KEY `INDEX_message` (`message`),
   KEY `INDEX_entity_table` (`entity_table`),
   KEY `INDEX_entity_record_id` (`entity_id`),
   KEY `INDEX_send_date` (`send_date`),
   KEY `INDEX_is_read` (`is_read`),
   KEY `INDEX_invoke_contact_id` (`invoke_contact_id`),``
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T18:02:04.580Z
Answers.Text: `` CONSTRAINT `FK_civicrm_contact_push_notification_message` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=59410 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci```
Answers.UserDisplayName: Webmaster du Bouclier
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T18:21:44.010Z
Answers.Text: @WebmasterduBouclier It's very hard to read this as a comment.  Could you please edit your question to include this information?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-03T19:19:28.067Z
Answers.Text: Searching through these comments, it seems that the `data` field is indeed missing from the log.  I updated my answer with something new to try.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-02T04:41:16.020Z
Answers.LastActivityDate: 2020-03-03T19:19:19.417Z
Answers.LastEditDate: 2020-03-03T19:19:19.417Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have an issue with the database for which I find no solution, even after intensive search on Internet.
  It now unables me to add a Participant to an Event. And even has consequences on adding Relationship or Memberships.
  Could you kindly help to solve this?
  Thanks for your help.
  Drupal 7.69
  CiviCRM 5.21.1</p>
  
  <p>Below are the logs</p>
  
  <pre><code>Feb 28 11:13:28  [error] $Fatal Error Details = Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -19
      [message] =&gt; DB Error: no such field
      [mode] =&gt; 16
      [debug_info] =&gt; INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']
      [type] =&gt; DB_Error
      [user_info] =&gt; INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']
      [to_string] =&gt; [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']"]
  )
  
  
  Feb 28 11:13:28  [debug] $backTrace = #0 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB.php(987): PEAR_Error-&gt;__construct("DB Error: no such field", -19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #3 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&gt;__construct(-19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #4 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...", "DB_Error", TRUE)
  #5 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/common.php(1920): PEAR-&gt;__call("raiseError", (Array:7))
  #6 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;raiseError(-19, NULL, NULL, "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...", "1054 ** Unknown column 'data' in 'field list'")
  #7 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli-&gt;mysqliRaiseError()
  #8 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/common.php(1229): DB_mysqli-&gt;simpleQuery("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #9 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/DataObject.php(2416): DB_common-&gt;query("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #10 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/DataObject.php(1040): DB_DataObject-&gt;_query("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #11 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/DAO.php(554): DB_DataObject-&gt;insert()
  #12 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/BAO/PushNotificationMessages.php(20): CRM_Core_DAO-&gt;save()
  #13 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/BAO/PushNotificationMessages.php(40): CRM_CiviMobileAPI_BAO_PushNotificationMessages::add((Array:7))
  #14 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/PushNotification/SaveMessageHelper.php(29): CRM_CiviMobileAPI_BAO_PushNotificationMessages::create((Array:7))
  #15 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/PushNotification/Utils/BasePushNotificationManager.php(59): CRM_CiviMobileAPI_PushNotification_SaveMessageHelper::saveMessages((Array:1), 1677, "Participant", "Soirée Dansante Mars 2020", "%display_name has created participant.", (Array:3))
  #16 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/civimobileapi.php(332): CRM_CiviMobileAPI_PushNotification_Utils_BasePushNotificationManager-&gt;sendNotification()
  #17 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook.php(298): civimobileapi_civicrm_post("create", "Participant", 1677, Object(CRM_Event_BAO_Participant))
  #18 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(74): CRM_Utils_Hook-&gt;runHooks((Array:72), "civicrm_post", 4, "create", "Participant", 1677, Object(CRM_Event_BAO_Participant), NULL, NULL)
  #19 /home/leboucli/activites/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(98): CRM_Utils_Hook_DrupalBase-&gt;invokeViaUF(4, "create", "Participant", 1677, Object(CRM_Event_BAO_Participant), NULL, NULL, "civicrm_post")
  #20 /home/leboucli/activites/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\PostEvent), "hook_civicrm_post", Object(Civi\Core\CiviEventDispatcher))
  #21 /home/leboucli/activites/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher-&gt;doDispatch((Array:2), "hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #22 /home/leboucli/activites/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch("hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #23 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook.php(392): Civi\Core\CiviEventDispatcher-&gt;dispatch("hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #24 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php(129): CRM_Utils_Hook::post("create", "Participant", 1677, Object(CRM_Event_BAO_Participant))
  #25 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php(181): CRM_Event_BAO_Participant::add((Array:15))
  #26 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration.php(853): CRM_Event_BAO_Participant::create((Array:15))
  #27 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration.php(695): CRM_Event_Form_Registration::addParticipant(Object(CRM_Event_Form_Registration_Confirm), "509")
  #28 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php(637): CRM_Event_Form_Registration-&gt;confirmPostProcess("509", NULL)
  #29 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Form.php(479): CRM_Event_Form_Registration_Confirm-&gt;postProcess()
  
  #30 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form-&gt;mainProcess()
  #31 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine-&gt;perform(Object(CRM_Event_Form_Registration_Confirm), "next", "Next")
  #32 /home/leboucli/activites/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next-&gt;perform(Object(CRM_Event_Form_Registration_Confirm), "next")
  #33 /home/leboucli/activites/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Event_Form_Registration_Confirm), "next")
  #34 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page-&gt;handle("next")
  #35 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Core_Controller-&gt;run((Array:3), NULL)
  #36 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15))
  #37 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
  #38 /home/leboucli/activites/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
  #39 /home/leboucli/activites/includes/menu.inc(527): civicrm_invoke("event", "register")
  #40 /home/leboucli/activites/index.php(21): menu_execute_active_handler()
  #41 {main}
  </code></pre>
  
  <p>[SOLVED]
  This issue was solved by installing a new extension, as Jon G - Megaphone Tech suggests below.
  Thanks @Jon G - Megaphone Tech for the very useful help.</p>
  
Tags: <error><database><civimobile>
Title: SOLVED CiviMobile: DB Error in adding a Participant to an Event
ThreadText: # SOLVED CiviMobile: DB Error in adding a Participant to an Event
  
  (Asked by: username_0 on 2020-03-01)
  
  I have an issue with the database for which I find no solution, even after intensive search on Internet.
  It now unables me to add a Participant to an Event. And even has consequences on adding Relationship or Memberships.
  Could you kindly help to solve this?
  Thanks for your help.
  Drupal 7.69
  CiviCRM 5.21.1
  
  Below are the logs
  
  ```
  Feb 28 11:13:28  [error] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , message , entity_table , entity_id ) VALUES ( 509 , 'Array' , '%display_name has created participant.' , 'Participant' ,  1677 )  [nativecode=1054 ** Unknown column 'data' in 'field list']"]
  )
  
  Feb 28 11:13:28  [debug] $backTrace = #0 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #3 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #4 /home/leboucli/activites/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...", "DB_Error", TRUE)
  #5 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
  #6 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...", "1054 ** Unknown column 'data' in 'field list'")
  #7 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
  #8 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #9 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/DataObject.php(2416): DB_common->query("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #10 /home/leboucli/activites/sites/all/modules/civicrm/packages/DB/DataObject.php(1040): DB_DataObject->_query("INSERT INTO civicrm_contact_push_notification_messages (contact_id , data , m...")
  #11 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/DAO.php(554): DB_DataObject->insert()
  #12 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/BAO/PushNotificationMessages.php(20): CRM_Core_DAO->save()
  #13 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/BAO/PushNotificationMessages.php(40): CRM_CiviMobileAPI_BAO_PushNotificationMessages::add((Array:7))
  #14 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/PushNotification/SaveMessageHelper.php(29): CRM_CiviMobileAPI_BAO_PushNotificationMessages::create((Array:7))
  #15 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/CRM/CiviMobileAPI/PushNotification/Utils/BasePushNotificationManager.php(59): CRM_CiviMobileAPI_PushNotification_SaveMessageHelper::saveMessages((Array:1), 1677, "Participant", "Soirée Dansante Mars 2020", "%display_name has created participant.", (Array:3))
  #16 /home/leboucli/activites/sites/default/files/civicrm/ext/com.agiliway.civimobileapi/civimobileapi.php(332): CRM_CiviMobileAPI_PushNotification_Utils_BasePushNotificationManager->sendNotification()
  #17 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook.php(298): civimobileapi_civicrm_post("create", "Participant", 1677, Object(CRM_Event_BAO_Participant))
  #18 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(74): CRM_Utils_Hook->runHooks((Array:72), "civicrm_post", 4, "create", "Participant", 1677, Object(CRM_Event_BAO_Participant), NULL, NULL)
  #19 /home/leboucli/activites/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(98): CRM_Utils_Hook_DrupalBase->invokeViaUF(4, "create", "Participant", 1677, Object(CRM_Event_BAO_Participant), NULL, NULL, "civicrm_post")
  #20 /home/leboucli/activites/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\PostEvent), "hook_civicrm_post", Object(Civi\Core\CiviEventDispatcher))
  #21 /home/leboucli/activites/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:2), "hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #22 /home/leboucli/activites/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #23 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Utils/Hook.php(392): Civi\Core\CiviEventDispatcher->dispatch("hook_civicrm_post", Object(Civi\Core\Event\PostEvent))
  #24 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php(129): CRM_Utils_Hook::post("create", "Participant", 1677, Object(CRM_Event_BAO_Participant))
  #25 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php(181): CRM_Event_BAO_Participant::add((Array:15))
  #26 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration.php(853): CRM_Event_BAO_Participant::create((Array:15))
  #27 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration.php(695): CRM_Event_Form_Registration::addParticipant(Object(CRM_Event_Form_Registration_Confirm), "509")
  #28 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Event/Form/Registration/Confirm.php(637): CRM_Event_Form_Registration->confirmPostProcess("509", NULL)
  #29 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Form.php(479): CRM_Event_Form_Registration_Confirm->postProcess()
  
  #30 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess()
  #31 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine->perform(Object(CRM_Event_Form_Registration_Confirm), "next", "Next")
  #32 /home/leboucli/activites/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Event_Form_Registration_Confirm), "next")
  #33 /home/leboucli/activites/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_Confirm), "next")
  #34 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("next")
  #35 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Core_Controller->run((Array:3), NULL)
  #36 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15))
  #37 /home/leboucli/activites/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
  #38 /home/leboucli/activites/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
  #39 /home/leboucli/activites/includes/menu.inc(527): civicrm_invoke("event", "register")
  #40 /home/leboucli/activites/index.php(21): menu_execute_active_handler()
  #41 {main}
  
  ```
  
  [SOLVED]
  This issue was solved by installing a new extension, as Jon G - Megaphone username_1 suggests below.
  Thanks @username_1 for the very useful help.
  
  **Tags:** error, database, civimobile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-02. Score: 4 | Accepted answer
  
  This error is related to the CiviMobile extension - you can see it mentioned in the backtrace, and the table with the error, `civicrm_contact_push_notification_messages`, is created by the CiviMobile extension.
  
  The error is that there's a field in that database table which is missing called `data`. I can see from the [CiviMobile source code](https://github.com/agiliway/com.agiliway.civimobileapi/blob/5d5c08fd7d564dc07e6ac5a10d48b2a8ceb5048f/CRM/CiviMobileAPI/Upgrader.php#L83) that this field was added with Version 5.0. Is it possible that you installed the upgrade but didn't run the database upgrade? Go to **Administer menu » Administration Console » System Status** and see if there's a message telling you to run the database upgrades.
  
  If the database upgrade ran but failed, you might be in your current situation. In that case, you'll need to run the following query on your MySQL database. I copied the query from the link above, which is the upgrade code.
  
  ```
  ALTER TABLE civicrm_contact_push_notification_messages ADD data varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
  
  ```
  
  UPDATE: Based on the comments below, it seems clear that the issue is with `log_civicrm_contact_push_notification_messages`, not `civicrm_contact_push_notification_messages`. This is a bug in the CiviMobile upgrade routine (though a common one). The trick is to run `CRM_Logging_Schema->fixSchemaDifferences`. The easiest way to do this is to install or enable an extension that's not currently installed; you can uninstall it immediately afterward.
  
  > **Comments:**
  > **username_0**: Thanks @username_1 for your quick answer. I had a look at the SQL table and the `Data` field is allready there. Nevertheless I ran the SQL command. But it just confirmed that the field is existing. `Requête SQL :  ALTER TABLE civicrm_contact_push_notification_messages ADD data varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL  MySQL a répondu : Documentation #1060 - Nom du champ 'data' déjà utilisé` What can I look at now to try and solve this issue ?  
  > **username_1**: @username_0 Do you have advanced logging turned on?  If so, can you see if `log_civicrm_contact_push_notification_messages`is missing the `data` field?  
  > **username_0**: Hi @username_1.  I ran the following SQL command ``show create table log_civicrm_contact_push_notification_messages`` Here's the result :  
  > **username_0**: ``CREATE TABLE `log_civicrm_contact_push_notification_messages` (  `id` int(10) unsigned DEFAULT NULL,  `contact_id` int(10) unsigned DEFAULT NULL,  `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `entity_id` int(11) DEFAULT NULL,  `send_date` timestamp NULL DEFAULT NULL,  `is_read` tinyint(4) DEFAULT '0',  `invoke_contact_id` int(10) unsigned DEFAULT NULL,  `message_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `log_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,``  
  > **username_0**: ``  `log_conn_id` varchar(17) COLLATE utf8_unicode_ci DEFAULT NULL,  `log_user_id` int(11) DEFAULT NULL,  `log_action` enum('Initialization','Insert','Update','Delete') COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci``  
  > **username_0**: And for total information the same on ``show create table civicrm_contact_push_notification_messages;`` gives ``CREATE TABLE `civicrm_contact_push_notification_messages` (  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,  `contact_id` int(10) unsigned NOT NULL,  `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `entity_id` int(11) DEFAULT NULL,  `send_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,  `is_read` tinyint(4) DEFAULT '0', ``  
  > **username_0**: `` `invoke_contact_id` int(10) unsigned DEFAULT NULL,  `message_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  `data` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,  PRIMARY KEY (`id`),  KEY `FK_civicrm_contact_push_notification_message` (`contact_id`),  KEY `INDEX_message` (`message`),  KEY `INDEX_entity_table` (`entity_table`),  KEY `INDEX_entity_record_id` (`entity_id`),  KEY `INDEX_send_date` (`send_date`),  KEY `INDEX_is_read` (`is_read`),  KEY `INDEX_invoke_contact_id` (`invoke_contact_id`),``  
  > **username_0**: `` CONSTRAINT `FK_civicrm_contact_push_notification_message` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=59410 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci```  
  > **username_1**: @username_0 It's very hard to read this as a comment.  Could you please edit your question to include this information?  
  > **username_1**: Searching through these comments, it seems that the `data` field is indeed missing from the log.  I updated my answer with something new to try.  
  
  ---
  
  