Answers.Body: <p>I've finally managed to upgrade to 5.24.0 after fixing the <a href="https://civicrm.stackexchange.com/questions/35209/resource-url-problem">resource URLs problem</a>. Thanks to Pradeep for answering that question, and thus also solving this one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-03T10:25:58.927Z
Answers.LastActivityDate: 2020-04-03T10:25:58.927Z
Answers.UserDisplayName: somnolentsurfer
Answers.Body: <p>Just as a remark. 
  It looks as my question "Strange error when updating 5.23.0 Joomla". Is your site on Windows? </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-30T09:35:32.630Z
Answers.Text: No, Linux/Apache.
Answers.UserDisplayName: somnolentsurfer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-30T20:49:57.743Z
Answers.Text: The problem must be in the absolute path setting. If you have no slash at the end in the setting, you can try the working with a slash. On windows I use no backslash at the end, but i saw that in the code that there was a test with a slash (not backslash). I have solved my problem (in 5.23.4 it is solved by CiviCRM) with updating the absolute path when it is generated.
Answers.UserDisplayName: HanV
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-31T11:50:12.680Z
Answers.Text: The slash at the end doesn't seem to make a difference, but I tested some changes to the setting, and it does appear to be that. I've put more details in the main question.
Answers.UserDisplayName: somnolentsurfer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-29T18:21:18.720Z
Answers.LastActivityDate: 2020-03-29T18:21:18.720Z
Answers.UserDisplayName: HanV
Body: <p>I've been trying to update CiviCRM from version 5.22.1. I've tried several of the different versions that have been released over the last week, each to no avail.</p>
  
  <p>I have put the site in maintenance mode, removed the old version, and unpacked the new version in /sites/all/modules/ just as I always do. The problems start when I try to upgrade the database.</p>
  
  <p>I visit the upgrade page at /civicrm/upgrade?reset=1 as normal:</p>
  
  <p><a href="https://i.sstatic.net/3oOwq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3oOwq.png" alt="Screenshot of the upgrade screen showing some warnings, but nothing out of the ordinary."></a></p>
  
  <p>I see a couple of warnings, but they've been around for a while without causing a problem. I'm not really sure why, as I've not customised any message templates. Had been assuming maybe it was to do with Mosaico.</p>
  
  <p>After I click 'Upgrade now', though, the site appears to freeze for a while, and then displays this:</p>
  
  <p><a href="https://i.sstatic.net/IH8cu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IH8cu.png" alt="Screenshot of failed upgrade screen."></a></p>
  
  <p>After that, Drupal still loads fine, but CiviCRM won't display anything but this:</p>
  
  <p><a href="https://i.sstatic.net/LHMB2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LHMB2.png" alt="Screenshot of incomplete CiviCRM Dashboard, showing System Status: Warning"></a></p>
  
  <p>If I roll back /sites/all/modules/civicrm/ to the backup of 5.22.1 everything works fine.</p>
  
  <p><strong>Edit:</strong> I've found this in the log:</p>
  
  <pre><code>Mar 27 12:15:33  [error] $Fatal Error Details = Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -1
      [message] =&gt; DB Error: unknown error
      [mode] =&gt; 16
      [debug_info] =&gt; CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
      [type] =&gt; DB_Error
      [user_info] =&gt; CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
      [to_string] =&gt; [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]"]
  )
  
  
  Mar 27 12:15:33  [debug] $backTrace = #0 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 &lt;drupal_root&gt;/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB.php(998): PEAR_Error-&gt;__construct("DB Error: unknown error", -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #3 &lt;drupal_root&gt;/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&gt;__construct(-1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #4 &lt;drupal_root&gt;/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "DB_Error", TRUE)
  #5 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR-&gt;__call("raiseError", (Array:7))
  #6 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/mysqli.php(935): DB_common-&gt;raiseError(-1, NULL, NULL, "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "1359 ** Trigger already exists")
  #7 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/mysqli.php(405): DB_mysqli-&gt;mysqliRaiseError()
  #8 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli-&gt;simpleQuery("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #9 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/DataObject.php(2691): DB_common-&gt;query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #10 &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject-&gt;_query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #11 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/DAO.php(421): DB_DataObject-&gt;query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #12 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/DAO.php(2160): CRM_Core_DAO-&gt;query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #13 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Upgrade/Form.php(470): CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE)
  #14 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(81): CRM_Upgrade_Form-&gt;checkUpgradeableVersion("5.22.1", "5.23.4")
  #15 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade-&gt;runIntro()
  #16 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Upgrade_Page_Upgrade-&gt;run((Array:2), NULL)
  #17 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
  #18 &lt;drupal_root&gt;/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
  #19 &lt;drupal_root&gt;/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:2))
  #20 &lt;drupal_root&gt;/includes/menu.inc(527): civicrm_invoke("upgrade")
  #21 &lt;drupal_root&gt;/index.php(21): menu_execute_active_handler()
  #22 {main}
  </code></pre>
  
  <p><strong>Further Update:</strong> I tried to rerun the upgrade again and got a ton of errors in the browser console:</p>
  
  <pre><code>[Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/lodash-compat/lodash.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.mousewheel.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/select2/select2.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.form.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.timeentry.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.blockUI.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/datatables/media/js/jquery.dataTables.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/jquery-validation/dist/jquery.validate.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] ReferenceError: Can't find variable: _
      Global Code (Common.js:5)
  [Error] ReferenceError: Can't find variable: _
      Global Code (crm.ajax.js:632)
  [Error] TypeError: undefined is not an object (evaluating '_.noop')
      (anonymous function) (crm.wysiwyg.js:21)
      Global Code (crm.wysiwyg.js:72)
  [Error] TypeError: undefined is not an object (evaluating '$.datepicker._defaults')
      (anonymous function) (en_GB:11)
      Global Code (en_GB:113)
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.tableHeader.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/packages/jquery/plugins/jquery.notify.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute &lt;drupal_root&gt;/sites/all/modules/civicrm/bower_components/jquery-ui/ui/i18n/datepicker-en-GB.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] ReferenceError: Can't find variable: _
      Global Code (noconflict.js:3)
  [Error] Error: Bootstrap requires jQuery
      Global Code (bootstrap.min.js:6)
  [Error] TypeError: undefined is not an object (evaluating '$.fn')
      (anonymous function) (superfish.js:11)
      Global Code (superfish.js:11:2766)
  [Error] TypeError: undefined is not an object (evaluating 'a.fn')
      (anonymous function) (mobilemenu.js:1:1885)
      Global Code (mobilemenu.js:1:2045)
  [Error] TypeError: jQuery is not a function. (In 'jQuery(window)', 'jQuery' is undefined)
      Global Code (custom.js:1)
  [Error] TypeError: undefined is not an object (evaluating 'jQuery.extend')
      Global Code (upgrade:77)
  [Error] TypeError: undefined is not an object (evaluating 'jQuery.support')
      (anonymous function) (drupal.js:584)
      l (jquery.min.js:2:17002)
      fireWith (jquery.min.js:2:17785)
      ready (jquery.min.js:2:12516)
      A (jquery.min.js:2:9915)
  </code></pre>
  
  <p><strong>Yet further edit:</strong> On further investigation, all those .js files that are reporting the incorrect Content-Type seem to be trying to load from a bad path. It looks like instead of prefixing the path with the base URL, it's trying to load from the $civicrm_root as defined in civicrm.settings.php. e.g. instead of trying to load</p>
  
  <p><a href="https://example.net/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css" rel="nofollow noreferrer">https://example.net/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css</a></p>
  
  <p>it's trying to get</p>
  
  <p><a href="https://example.net//var/sites/example.net/public_html/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css" rel="nofollow noreferrer">https://example.net//var/sites/example.net/public_html/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css</a></p>
  
  <p>The guidance in the File System Paths section of civicrm.settings.php says that $civicrm_root should be the absolute system path, so it looks to me like it is defined correctly. So I'm not sure why it's loading from the wrong place?</p>
  
  <p><strong>Another Edit, March 31st:</strong> I had a play around with $civicrm_root and looking at the results it produces in those javascript errors. It's clear that is where the incorrect path is coming from. But it definitely looks like it's set as per the instructions. If I set it so as that it fixes those errors and reaches the missing files with valid paths (e.g. <code>$civicrm_root = '/sites/all/modules/civicrm</code>';) then CiviCRM won't even load. I just get this:</p>
  
  <p><a href="https://i.sstatic.net/wQTVu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wQTVu.png" alt="screenshot of CiviCRM not loading"></a></p>
  
  <p>What else might be affecting that path besides $civicrm_root?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T13:01:57.760Z
Comments.Text: check browser console to see if there are any js error? worth checking civicrm log file if anything supicious
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T14:11:13.580Z
Comments.Text: @PradeepNayak Updated the question with something that looks suspicious from the log.
Comments.UserDisplayName: somnolentsurfer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T14:19:14.933Z
Comments.Text: Can you execute the 'DROP TRIGGER IF EXISTS civicrm_domain_trigger' sql and do upgrade?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T14:27:52.557Z
Comments.Text: @PradeepNayak I get 'MySQL returned an empty result set (i.e. zero rows).' and then the upgrade gives the same result as before. I'm a total SQL beginner, so maybe I'm doing it in the wrong place? I pasted your command (minus the quotes) into the SQL tab of my CiviCRM database on phpMyAdmin and hit 'Go'.
Comments.UserDisplayName: somnolentsurfer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T14:44:28.407Z
Comments.Text: do you still get DB error?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T15:04:16.367Z
Comments.Text: @PradeepNayak I've attempted the upgrade script multiple times today, but as far as I can see the DB error has only been logged the once, even before trying that SQL command.
Comments.UserDisplayName: somnolentsurfer
Tags: <upgrade>
Title: Unable to upgrade from version 5.22.1
ThreadText: # Unable to upgrade from version 5.22.1
  
  (Asked by: username_0 on 2020-03-27)
  
  I've been trying to update CiviCRM from version 5.22.1. I've tried several of the different versions that have been released over the last week, each to no avail.
  
  I have put the site in maintenance mode, removed the old version, and unpacked the new version in /sites/all/modules/ just as I always do. The problems start when I try to upgrade the database.
  
  I visit the upgrade page at /civicrm/upgrade?reset=1 as normal:
  
  [![Screenshot of the upgrade screen showing some warnings, but nothing out of the ordinary.](https://i.sstatic.net/3oOwq.png)](https://i.sstatic.net/3oOwq.png)
  
  I see a couple of warnings, but they've been around for a while without causing a problem. I'm not really sure why, as I've not customised any message templates. Had been assuming maybe it was to do with Mosaico.
  
  After I click 'Upgrade now', though, the site appears to freeze for a while, and then displays this:
  
  [![Screenshot of failed upgrade screen.](https://i.sstatic.net/IH8cu.png)](https://i.sstatic.net/IH8cu.png)
  
  After that, Drupal still loads fine, but CiviCRM won't display anything but this:
  
  [![Screenshot of incomplete CiviCRM Dashboard, showing System Status: Warning](https://i.sstatic.net/LHMB2.png)](https://i.sstatic.net/LHMB2.png)
  
  If I roll back /sites/all/modules/civicrm/ to the backup of 5.22.1 everything works fine.
  
  **Edit:** I've found this in the log:
  
  ```
  Mar 27 12:15:33  [error] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
      [type] => DB_Error
      [user_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1359 ** Trigger already exists]"]
  )
  
  Mar 27 12:15:33  [debug] $backTrace = #0 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 <drupal_root>/sites/all/modules/civicrm/packages/DB.php(998): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #3 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #4 <drupal_root>/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "DB_Error", TRUE)
  #5 <drupal_root>/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
  #6 <drupal_root>/sites/all/modules/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-1, NULL, NULL, "CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...", "1359 ** Trigger already exists")
  #7 <drupal_root>/sites/all/modules/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
  #8 <drupal_root>/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #9 <drupal_root>/sites/all/modules/civicrm/packages/DB/DataObject.php(2691): DB_common->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #10 <drupal_root>/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #11 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(421): DB_DataObject->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #12 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(2160): CRM_Core_DAO->query("CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EAC...")
  #13 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Form.php(470): CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE)
  #14 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(81): CRM_Upgrade_Form->checkUpgradeableVersion("5.22.1", "5.23.4")
  #15 <drupal_root>/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade->runIntro()
  #16 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
  #17 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
  #18 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
  #19 <drupal_root>/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:2))
  #20 <drupal_root>/includes/menu.inc(527): civicrm_invoke("upgrade")
  #21 <drupal_root>/index.php(21): menu_execute_active_handler()
  #22 {main}
  
  ```
  
  **Further Update:** I tried to rerun the upgrade again and got a ton of errors in the browser console:
  
  ```
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/lodash-compat/lodash.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.mousewheel.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/select2/select2.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.form.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.timeentry.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.blockUI.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/datatables/media/js/jquery.dataTables.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-validation/dist/jquery.validate.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] ReferenceError: Can't find variable: _
      Global Code (Common.js:5)
  [Error] ReferenceError: Can't find variable: _
      Global Code (crm.ajax.js:632)
  [Error] TypeError: undefined is not an object (evaluating '_.noop')
      (anonymous function) (crm.wysiwyg.js:21)
      Global Code (crm.wysiwyg.js:72)
  [Error] TypeError: undefined is not an object (evaluating '$.datepicker._defaults')
      (anonymous function) (en_GB:11)
      Global Code (en_GB:113)
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.tableHeader.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/packages/jquery/plugins/jquery.notify.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] Refused to execute <drupal_root>/sites/all/modules/civicrm/bower_components/jquery-ui/ui/i18n/datepicker-en-GB.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
  [Error] ReferenceError: Can't find variable: _
      Global Code (noconflict.js:3)
  [Error] Error: Bootstrap requires jQuery
      Global Code (bootstrap.min.js:6)
  [Error] TypeError: undefined is not an object (evaluating '$.fn')
      (anonymous function) (superfish.js:11)
      Global Code (superfish.js:11:2766)
  [Error] TypeError: undefined is not an object (evaluating 'a.fn')
      (anonymous function) (mobilemenu.js:1:1885)
      Global Code (mobilemenu.js:1:2045)
  [Error] TypeError: jQuery is not a function. (In 'jQuery(window)', 'jQuery' is undefined)
      Global Code (custom.js:1)
  [Error] TypeError: undefined is not an object (evaluating 'jQuery.extend')
      Global Code (upgrade:77)
  [Error] TypeError: undefined is not an object (evaluating 'jQuery.support')
      (anonymous function) (drupal.js:584)
      l (jquery.min.js:2:17002)
      fireWith (jquery.min.js:2:17785)
      ready (jquery.min.js:2:12516)
      A (jquery.min.js:2:9915)
  
  ```
  
  **Yet further edit:** On further investigation, all those .js files that are reporting the incorrect Content-Type seem to be trying to load from a bad path. It looks like instead of prefixing the path with the base URL, it's trying to load from the $civicrm\_root as defined in civicrm.settings.php. e.g. instead of trying to load
  
  <https://example.net/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css>
  
  it's trying to get
  
  <https://example.net//var/sites/example.net/public_html/sites/all/modules/civicrm/bower_components/datatables/media/css/jquery.dataTables.min.css>
  
  The guidance in the File System Paths section of civicrm.settings.php says that $civicrm\_root should be the absolute system path, so it looks to me like it is defined correctly. So I'm not sure why it's loading from the wrong place?
  
  **Another Edit, March 31st:** I had a play around with $civicrm\_root and looking at the results it produces in those javascript errors. It's clear that is where the incorrect path is coming from. But it definitely looks like it's set as per the instructions. If I set it so as that it fixes those errors and reaches the missing files with valid paths (e.g. `$civicrm_root = '/sites/all/modules/civicrm`';) then CiviCRM won't even load. I just get this:
  
  [![screenshot of CiviCRM not loading](https://i.sstatic.net/wQTVu.png)](https://i.sstatic.net/wQTVu.png)
  
  What else might be affecting that path besides $civicrm\_root?
  
  **Tags:** upgrade
  
  > **Comments:**
  > **username_1**: check browser console to see if there are any js error? worth checking civicrm log file if anything supicious  
  > **username_0**: @username_1 Updated the question with something that looks suspicious from the log.  
  > **username_1**: Can you execute the 'DROP TRIGGER IF EXISTS civicrm_domain_trigger' sql and do upgrade?  
  > **username_0**: @username_1 I get 'MySQL returned an empty result set (i.e. zero rows).' and then the upgrade gives the same result as before. I'm a total SQL beginner, so maybe I'm doing it in the wrong place? I pasted your command (minus the quotes) into the SQL tab of my CiviCRM database on phpMyAdmin and hit 'Go'.  
  > **username_1**: do you still get DB error?  
  > **username_0**: @username_1 I've attempted the upgrade script multiple times today, but as far as I can see the DB error has only been logged the once, even before trying that SQL command.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-04-03. Score: 1 | Accepted answer
  
  I've finally managed to upgrade to 5.24.0 after fixing the [resource URLs problem](https://civicrm.stackexchange.com/questions/35209/resource-url-problem). Thanks to username_1 for answering that question, and thus also solving this one.
  
  
  ---
  
  ### Answer by username_2 on 2020-03-29. Score: 0
  
  Just as a remark.
  It looks as my question "Strange error when updating 5.23.0 Joomla". Is your site on Windows?
  
  > **Comments:**
  > **username_0**: No, Linux/Apache.  
  > **username_2**: The problem must be in the absolute path setting. If you have no slash at the end in the setting, you can try the working with a slash. On windows I use no backslash at the end, but i saw that in the code that there was a test with a slash (not backslash). I have solved my problem (in 5.23.4 it is solved by CiviCRM) with updating the absolute path when it is generated.  
  > **username_0**: The slash at the end doesn't seem to make a difference, but I tested some changes to the setting, and it does appear to be that. I've put more details in the main question.  
  
  ---
  
  