From 02aa7c4f34efa88af145023729e1927907d1ff46 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Wed, 21 Dec 2022 06:59:06 -0500
Subject: [PATCH] civicrm release-5.56.1

---
 civicrm.php                                   |  4 +-
 civicrm/CRM/Batch/Form/Batch.php              |  7 +++
 .../Contribute/Import/Parser/Contribution.php |  2 +-
 civicrm/CRM/Financial/BAO/Order.php           |  5 ++-
 civicrm/CRM/Price/BAO/PriceField.php          |  4 +-
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/ext/afform/admin/info.xml             |  2 +-
 civicrm/ext/afform/core/info.xml              |  2 +-
 civicrm/ext/afform/html/info.xml              |  2 +-
 civicrm/ext/afform/mock/info.xml              |  2 +-
 civicrm/ext/authx/info.xml                    |  2 +-
 civicrm/ext/civicrm_admin_ui/info.xml         |  2 +-
 civicrm/ext/civigrant/info.xml                |  2 +-
 civicrm/ext/civiimport/info.xml               |  2 +-
 civicrm/ext/ckeditor4/info.xml                |  2 +-
 .../ext/contributioncancelactions/info.xml    |  2 +-
 civicrm/ext/elavon/info.xml                   |  2 +-
 civicrm/ext/eventcart/info.xml                |  2 +-
 civicrm/ext/ewaysingle/info.xml               |  2 +-
 civicrm/ext/financialacls/info.xml            |  2 +-
 civicrm/ext/flexmailer/info.xml               |  2 +-
 .../src/ClickTracker/TextClickTracker.php     |  2 +-
 .../ClickTracker/TextClickTrackerTest.php     |  6 ++-
 civicrm/ext/greenwich/info.xml                |  2 +-
 civicrm/ext/legacycustomsearches/info.xml     |  2 +-
 civicrm/ext/message_admin/info.xml            |  2 +-
 civicrm/ext/oauth-client/info.xml             |  2 +-
 civicrm/ext/payflowpro/info.xml               |  2 +-
 civicrm/ext/recaptcha/info.xml                |  2 +-
 .../search_kit/ang/crmSearchAdmin.module.js   |  5 ++-
 civicrm/ext/search_kit/info.xml               |  2 +-
 civicrm/ext/sequentialcreditnotes/info.xml    |  2 +-
 civicrm/release-notes.md                      |  9 ++++
 civicrm/release-notes/5.56.1.md               | 43 +++++++++++++++++++
 civicrm/sql/civicrm_data.mysql                |  2 +-
 civicrm/sql/civicrm_generated.mysql           |  2 +-
 .../templates/CRM/Financial/Form/Search.tpl   |  2 +-
 civicrm/vendor/autoload.php                   |  2 +-
 civicrm/vendor/composer/autoload_psr4.php     |  2 +-
 civicrm/vendor/composer/autoload_real.php     | 14 +++---
 civicrm/vendor/composer/autoload_static.php   | 16 +++----
 civicrm/vendor/composer/include_paths.php     |  2 +-
 civicrm/vendor/composer/installed.php         |  4 +-
 civicrm/xml/version.xml                       |  2 +-
 44 files changed, 126 insertions(+), 57 deletions(-)
 create mode 100644 civicrm/release-notes/5.56.1.md

diff --git a/civicrm.php b/civicrm.php
index 7ecdb17bee..6df4ca4584 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: CiviCRM
  * Description: CiviCRM - Growing and Sustaining Relationships
- * Version: 5.56.0
+ * Version: 5.56.1
  * Requires at least: 4.9
  * Requires PHP:      7.2
  * Author: CiviCRM LLC
@@ -36,7 +36,7 @@ if (!defined('ABSPATH')) {
 }
 
 // Set version here: changing it forces Javascript and CSS to reload.
-define('CIVICRM_PLUGIN_VERSION', '5.56.0');
+define('CIVICRM_PLUGIN_VERSION', '5.56.1');
 
 // Store reference to this file.
 if (!defined('CIVICRM_PLUGIN_FILE')) {
diff --git a/civicrm/CRM/Batch/Form/Batch.php b/civicrm/CRM/Batch/Form/Batch.php
index 3f4b34af52..2f53b43f6c 100644
--- a/civicrm/CRM/Batch/Form/Batch.php
+++ b/civicrm/CRM/Batch/Form/Batch.php
@@ -18,6 +18,13 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form {
 
   protected $submittableMoneyFields = ['total'];
 
+  /**
+   * Explicitly declare the entity api name.
+   */
+  public function getDefaultEntity() {
+    return 'Batch';
+  }
+
   /**
    * PreProcess function.
    */
diff --git a/civicrm/CRM/Contribute/Import/Parser/Contribution.php b/civicrm/CRM/Contribute/Import/Parser/Contribution.php
index 744742bced..2f54ac9554 100644
--- a/civicrm/CRM/Contribute/Import/Parser/Contribution.php
+++ b/civicrm/CRM/Contribute/Import/Parser/Contribution.php
@@ -185,7 +185,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
    * @return array
    */
   public function getRequiredFieldsForMatch(): array {
-    return [['id'], ['invoice_id'], ['trxn_id']];
+    return [['contribution_id'], ['invoice_id'], ['trxn_id']];
   }
 
   /**
diff --git a/civicrm/CRM/Financial/BAO/Order.php b/civicrm/CRM/Financial/BAO/Order.php
index a2ae54e8c3..f1ed6c04da 100644
--- a/civicrm/CRM/Financial/BAO/Order.php
+++ b/civicrm/CRM/Financial/BAO/Order.php
@@ -838,7 +838,10 @@ class CRM_Financial_BAO_Order {
       // Set the price set ID from the first line item (we need to set this here
       // to prevent a loop later when we retrieve the price field metadata to
       // set the 'title' (as accessed from workflow message templates).
-      $this->setPriceSetID($lineItems[0]['price_field_id.price_set_id']);
+      // Contributions *should* all have line items, but historically, imports did not create them.
+      if ($lineItems) {
+        $this->setPriceSetID($lineItems[0]['price_field_id.price_set_id']);
+      }
     }
     else {
       foreach ($this->getPriceOptions() as $fieldID => $valueID) {
diff --git a/civicrm/CRM/Price/BAO/PriceField.php b/civicrm/CRM/Price/BAO/PriceField.php
index 05821e18f9..163f553eab 100644
--- a/civicrm/CRM/Price/BAO/PriceField.php
+++ b/civicrm/CRM/Price/BAO/PriceField.php
@@ -382,7 +382,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
 
         foreach ($customOption as $opId => $opt) {
           $preHelpText = $postHelpText = '';
-          $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>';
+          $opt['label'] = !empty($opt['label']) ? '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' : '';
           if (!empty($opt['help_pre'])) {
             $preHelpText = '<span class="crm-price-amount-help-pre description">' . $opt['help_pre'] . '</span><span class="crm-price-amount-help-pre-separator">:&nbsp;</span>';
           }
@@ -567,7 +567,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
           $max_value = CRM_Utils_Array::value('max_value', $opt, '');
 
           $preHelpText = $postHelpText = '';
-          $opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>';
+          $opt['label'] = !empty($opt['label']) ? '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' : '';
           if (!empty($opt['help_pre'])) {
             $preHelpText = '<span class="crm-price-amount-help-pre description">' . $opt['help_pre'] . '</span><span class="crm-price-amount-help-pre-separator">:&nbsp;</span>';
           }
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index 2b31db3ed0..bd8442f893 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.56.0',
+  return array( 'version'  => '5.56.1',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/ext/afform/admin/info.xml b/civicrm/ext/afform/admin/info.xml
index 316e680963..7b94223e2d 100644
--- a/civicrm/ext/afform/admin/info.xml
+++ b/civicrm/ext/afform/admin/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/afform/core/info.xml b/civicrm/ext/afform/core/info.xml
index 287efb7cd6..c420186503 100644
--- a/civicrm/ext/afform/core/info.xml
+++ b/civicrm/ext/afform/core/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/afform/html/info.xml b/civicrm/ext/afform/html/info.xml
index 0f531f26c2..6739fe6708 100644
--- a/civicrm/ext/afform/html/info.xml
+++ b/civicrm/ext/afform/html/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/afform/mock/info.xml b/civicrm/ext/afform/mock/info.xml
index 60527abd2f..fe19224e44 100644
--- a/civicrm/ext/afform/mock/info.xml
+++ b/civicrm/ext/afform/mock/info.xml
@@ -12,7 +12,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/authx/info.xml b/civicrm/ext/authx/info.xml
index 79b8055e3a..0cd57eee16 100644
--- a/civicrm/ext/authx/info.xml
+++ b/civicrm/ext/authx/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-02-11</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/civicrm_admin_ui/info.xml b/civicrm/ext/civicrm_admin_ui/info.xml
index 63d4aa2e0c..ef781d289d 100644
--- a/civicrm/ext/civicrm_admin_ui/info.xml
+++ b/civicrm/ext/civicrm_admin_ui/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-01-02</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/civigrant/info.xml b/civicrm/ext/civigrant/info.xml
index fd5d62ae81..cfc930b842 100644
--- a/civicrm/ext/civigrant/info.xml
+++ b/civicrm/ext/civigrant/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-11-11</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/civiimport/info.xml b/civicrm/ext/civiimport/info.xml
index 10724995d8..a4f3443310 100644
--- a/civicrm/ext/civiimport/info.xml
+++ b/civicrm/ext/civiimport/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-11</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/ckeditor4/info.xml b/civicrm/ext/ckeditor4/info.xml
index ff502129bf..3571d1a117 100644
--- a/civicrm/ext/ckeditor4/info.xml
+++ b/civicrm/ext/ckeditor4/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-05-23</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/contributioncancelactions/info.xml b/civicrm/ext/contributioncancelactions/info.xml
index 5404e43568..4a80c3bd48 100644
--- a/civicrm/ext/contributioncancelactions/info.xml
+++ b/civicrm/ext/contributioncancelactions/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-12</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/elavon/info.xml b/civicrm/ext/elavon/info.xml
index 2da131cb97..8fe1b58511 100644
--- a/civicrm/ext/elavon/info.xml
+++ b/civicrm/ext/elavon/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-05</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/eventcart/info.xml b/civicrm/ext/eventcart/info.xml
index 3a455d5c87..0144f5b8d9 100644
--- a/civicrm/ext/eventcart/info.xml
+++ b/civicrm/ext/eventcart/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-03</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/ewaysingle/info.xml b/civicrm/ext/ewaysingle/info.xml
index 05f228bffd..f8c0503fe0 100644
--- a/civicrm/ext/ewaysingle/info.xml
+++ b/civicrm/ext/ewaysingle/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-07</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/financialacls/info.xml b/civicrm/ext/financialacls/info.xml
index 504b6c1909..277e7c917d 100644
--- a/civicrm/ext/financialacls/info.xml
+++ b/civicrm/ext/financialacls/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-27</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/flexmailer/info.xml b/civicrm/ext/flexmailer/info.xml
index 9a9706e488..29a8808332 100644
--- a/civicrm/ext/flexmailer/info.xml
+++ b/civicrm/ext/flexmailer/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-05</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <comments>
     FlexMailer is an email delivery engine which replaces the internal guts
diff --git a/civicrm/ext/flexmailer/src/ClickTracker/TextClickTracker.php b/civicrm/ext/flexmailer/src/ClickTracker/TextClickTracker.php
index 63a14a0955..1fdea53e8b 100644
--- a/civicrm/ext/flexmailer/src/ClickTracker/TextClickTracker.php
+++ b/civicrm/ext/flexmailer/src/ClickTracker/TextClickTracker.php
@@ -37,7 +37,7 @@ class TextClickTracker implements ClickTrackerInterface {
     };
     // Find any HTTP(S) URLs in the text.
     // return preg_replace_callback('/\b(?:(?:https?):\/\/|www\.|ftp\.)[-A-Z0-9+&@#\/%=~_|$?!:,.]*[A-Z0-9+&@#\/%=~_|$]/i', $callback, $tex
-    return preg_replace_callback('/\b(?:(?:https?):\/\/)[\w+&@#\/%=~_|$?!:,.{}\[\];]*[\w+&@#\/%=~_|${}\[\];]/iu',
+    return preg_replace_callback('/\b(?:(?:https?):\/\/)[\w+&@#\/%=~_|$?!:,.{}\[\];\-]*[\w+&@#\/%=~_|${}\[\];\-]/iu',
       $callback, $text);
   }
 
diff --git a/civicrm/ext/flexmailer/tests/phpunit/Civi/FlexMailer/ClickTracker/TextClickTrackerTest.php b/civicrm/ext/flexmailer/tests/phpunit/Civi/FlexMailer/ClickTracker/TextClickTrackerTest.php
index 64f8b7f8c0..ddac3ba63f 100644
--- a/civicrm/ext/flexmailer/tests/phpunit/Civi/FlexMailer/ClickTracker/TextClickTrackerTest.php
+++ b/civicrm/ext/flexmailer/tests/phpunit/Civi/FlexMailer/ClickTracker/TextClickTrackerTest.php
@@ -70,7 +70,11 @@ class TextClickTrackerTest extends \CiviUnitTestCase {
       '<p><a href="http://example.com/1">First</a><a href="http://example.com/2">Second</a><a href=\'http://example.com/3\'>Third</a><a href="http://example.com/4">Fourth</a></p>',
       '<p><a href="tracking(http://example.com/1)" rel=\'nofollow\'>First</a><a href="tracking(http://example.com/2)" rel=\'nofollow\'>Second</a><a href=\'tracking(http://example.com/3)\' rel=\'nofollow\'>Third</a><a href="tracking(http://example.com/4)" rel=\'nofollow\'>Fourth</a></p>',
     ];
-
+    $exs[] = [
+      // Messy looking URL, including hyphens
+      '<p><a href=\'https://sub.example-url.com/foo-bar.php?whiz=%2Fbang%2F&pie[fruit]=apple-pie\'>Foo</a></p>',
+      '<p><a href=\'tracking(https://sub.example-url.com/foo-bar.php?whiz=%2Fbang%2F&pie[fruit]=apple-pie)\' rel=\'nofollow\'>Foo</a></p>',
+    ];
     return $exs;
   }
 
diff --git a/civicrm/ext/greenwich/info.xml b/civicrm/ext/greenwich/info.xml
index 2e3fb09cc3..a488452ca1 100644
--- a/civicrm/ext/greenwich/info.xml
+++ b/civicrm/ext/greenwich/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-07-21</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/legacycustomsearches/info.xml b/civicrm/ext/legacycustomsearches/info.xml
index 69d3eb62d6..127a022c69 100644
--- a/civicrm/ext/legacycustomsearches/info.xml
+++ b/civicrm/ext/legacycustomsearches/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-07-25</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <tags>
     <tag>mgmt:hidden</tag>
diff --git a/civicrm/ext/message_admin/info.xml b/civicrm/ext/message_admin/info.xml
index 24194a08ed..77b9f20b8b 100644
--- a/civicrm/ext/message_admin/info.xml
+++ b/civicrm/ext/message_admin/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-06-12</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/oauth-client/info.xml b/civicrm/ext/oauth-client/info.xml
index f6509954f9..c23d4216e6 100644
--- a/civicrm/ext/oauth-client/info.xml
+++ b/civicrm/ext/oauth-client/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-23</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/payflowpro/info.xml b/civicrm/ext/payflowpro/info.xml
index b3fa6ed74d..43e76225f3 100644
--- a/civicrm/ext/payflowpro/info.xml
+++ b/civicrm/ext/payflowpro/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-13</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/recaptcha/info.xml b/civicrm/ext/recaptcha/info.xml
index a339590902..8bbe13c08d 100644
--- a/civicrm/ext/recaptcha/info.xml
+++ b/civicrm/ext/recaptcha/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-03</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/search_kit/ang/crmSearchAdmin.module.js b/civicrm/ext/search_kit/ang/crmSearchAdmin.module.js
index 1669081dcb..a4c6595e76 100644
--- a/civicrm/ext/search_kit/ang/crmSearchAdmin.module.js
+++ b/civicrm/ext/search_kit/ang/crmSearchAdmin.module.js
@@ -408,7 +408,10 @@
               _.each(results, function(fields, entityName) {
                 var entity = getEntity(entityName);
                 _.each(fields, function(options, fieldName) {
-                  _.find(entity.fields, {name: fieldName}).options = options;
+                  var field = _.find(entity.fields, {name: fieldName});
+                  if (field) {
+                    field.options = options;
+                  }
                 });
                 entity.optionsLoaded = true;
               });
diff --git a/civicrm/ext/search_kit/info.xml b/civicrm/ext/search_kit/info.xml
index ba5d322112..147b099107 100644
--- a/civicrm/ext/search_kit/info.xml
+++ b/civicrm/ext/search_kit/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-01-06</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.56</ver>
diff --git a/civicrm/ext/sequentialcreditnotes/info.xml b/civicrm/ext/sequentialcreditnotes/info.xml
index ff8c530e9d..e5e67e5610 100644
--- a/civicrm/ext/sequentialcreditnotes/info.xml
+++ b/civicrm/ext/sequentialcreditnotes/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-28</releaseDate>
-  <version>5.56.0</version>
+  <version>5.56.1</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md
index 6bd21b36ac..98d893b96c 100644
--- a/civicrm/release-notes.md
+++ b/civicrm/release-notes.md
@@ -15,6 +15,15 @@ Other resources for identifying changes are:
     * https://github.com/civicrm/civicrm-joomla
     * https://github.com/civicrm/civicrm-wordpress
 
+## CiviCRM 5.56.1
+
+Released December 20, 2022
+
+- **[Synopsis](release-notes/5.56.1.md#synopsis)**
+- **[Bugs resolved](release-notes/5.56.1.md#bugs)**
+- **[Credits](release-notes/5.56.1.md#credits)**
+- **[Feedback](release-notes/5.56.1.md#feedback)**
+
 ## CiviCRM 5.56.0
 
 Released December 7, 2022
diff --git a/civicrm/release-notes/5.56.1.md b/civicrm/release-notes/5.56.1.md
new file mode 100644
index 0000000000..c9c287ef89
--- /dev/null
+++ b/civicrm/release-notes/5.56.1.md
@@ -0,0 +1,43 @@
+# CiviCRM 5.56.1
+
+Released December 20, 2022
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |          |
+| --------------------------------------------------------------- | -------- |
+| Change the database schema?                                     | no       |
+| Alter the API?                                                  | no       |
+| Require attention to configuration options?                     | no       |
+| Fix problems installing or upgrading to a previous version?     | no       |
+| Introduce features?                                             | no       |
+| **Fix bugs?**                                                   | **yes**  |
+
+## <a name="bugs"></a>Bugs resolved
+
+* **_CiviAccounts_: Closing a batch generates Javascript error (if authx is enabled) ([dev/core#3960](https://lab.civicrm.org/dev/core/-/issues/3960): [#25129](https://github.com/civicrm/civicrm-core/pull/25129))**
+* **_CiviAccounts_: "New Batch" page does not load ([dev/core#4036](https://lab.civicrm.org/dev/core/-/issues/4036): [#25189](https://github.com/civicrm/civicrm-core/pull/25189))**
+* **_CiviContribute_: Crash when displaying a contribution without any line-items ([dev/core#4027](https://lab.civicrm.org/dev/core/-/issues/4027): [#25145](https://github.com/civicrm/civicrm-core/pull/25145))**
+* **_CiviContribute_: Contribution amount sometimes displays extraneous dash ([#25033](https://github.com/civicrm/civicrm-core/pull/25033))**
+* **_CiviContribute_: Import error when using "update" mode ([dev/core#4038](https://lab.civicrm.org/dev/core/-/issues/4038): [#25204](https://github.com/civicrm/civicrm-core/pull/25204))**
+* **_Flexmailer_: Tracked URLs with hyphens do not work ([#25149](https://github.com/civicrm/civicrm-core/pull/25149))**
+* **_SearchKit_: Console error when loading options ([#25198](https://github.com/civicrm/civicrm-core/pull/25198))**
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+Wildsight - Lars Sanders-Green; Wikimedia Foundation - Eileen McNaughton; Third Sector
+Design - Kurund Jalmi; Megaphone Technology Consulting - Jon Goldberg; JMA Consulting -
+Seamus Lee; Dave D; CiviDesk - Yashodha Chaku; CiviCRM - Coleman Watts, Tim Otten
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andie Hunt.  If you'd like to
+provide feedback on them, please login to https://chat.civicrm.org/civicrm and
+contact `@agh1`.
diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql
index 752fe4b5c9..81b0569764 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23654,4 +23654,4 @@ INSERT INTO `civicrm_report_instance`
     ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
 VALUES
     (  @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}');
-UPDATE civicrm_domain SET version = '5.56.0';
+UPDATE civicrm_domain SET version = '5.56.1';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index 172df3a466..57171780b6 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -3038,7 +3038,7 @@ UNLOCK TABLES;
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
 INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES
- (1,'Default Domain Name',NULL,'5.56.0',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+ (1,'Default Domain Name',NULL,'5.56.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/civicrm/templates/CRM/Financial/Form/Search.tpl b/civicrm/templates/CRM/Financial/Form/Search.tpl
index 53301668cf..54c29a0b3e 100644
--- a/civicrm/templates/CRM/Financial/Form/Search.tpl
+++ b/civicrm/templates/CRM/Financial/Form/Search.tpl
@@ -218,7 +218,7 @@ CRM.$(function($) {
   function saveRecords(records, op) {
     var postUrl = CRM.url('civicrm/ajax/rest', 'className=CRM_Financial_Page_AJAX&fnName=assignRemove');
     //post request and get response
-    $.post(postUrl, {records: records, recordBAO: 'CRM_Batch_BAO_Batch', op: op, key: {/literal}"{crmKey name='civicrm/ajax/ar'}"{literal}},
+    $.post(postUrl, {records: records, recordBAO: 'CRM_Batch_BAO_Batch', op: op},
       function(response) {
         //this is custom status set when record update success.
         if (response.status == 'record-updated-success') {
diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php
index b98249889f..65a3e5aacc 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d::getLoader();
+return ComposerAutoloaderInit740844413d66040dc31b51396d7da1ec::getLoader();
diff --git a/civicrm/vendor/composer/autoload_psr4.php b/civicrm/vendor/composer/autoload_psr4.php
index 707471bcbd..b1c258842f 100644
--- a/civicrm/vendor/composer/autoload_psr4.php
+++ b/civicrm/vendor/composer/autoload_psr4.php
@@ -51,7 +51,7 @@ return array(
     'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'),
     'MJS\\TopSort\\Tests\\' => array($vendorDir . '/marcj/topsort/tests/Tests'),
     'MJS\\TopSort\\' => array($vendorDir . '/marcj/topsort/src'),
-    'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-google/src'),
+    'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-google/src', $vendorDir . '/league/oauth2-client/src'),
     'League\\Csv\\' => array($vendorDir . '/league/csv/src'),
     'LastCall\\DownloadsPlugin\\' => array($vendorDir . '/civicrm/composer-downloads-plugin/src'),
     'Laminas\\ZendFrameworkBridge\\' => array($vendorDir . '/laminas/laminas-zendframework-bridge/src'),
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index 032c509655..b073e7dc53 100644
--- a/civicrm/vendor/composer/autoload_real.php
+++ b/civicrm/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d
+class ComposerAutoloaderInit740844413d66040dc31b51396d7da1ec
 {
     private static $loader;
 
@@ -24,9 +24,9 @@ class ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d
 
         require __DIR__ . '/platform_check.php';
 
-        spl_autoload_register(array('ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit740844413d66040dc31b51396d7da1ec', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
-        spl_autoload_unregister(array('ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit740844413d66040dc31b51396d7da1ec', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
@@ -36,7 +36,7 @@ class ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d
         if ($useStaticLoader) {
             require __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInit003bc5bfffa29651294b88def978eb7d::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInit740844413d66040dc31b51396d7da1ec::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -57,12 +57,12 @@ class ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInit740844413d66040dc31b51396d7da1ec::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire003bc5bfffa29651294b88def978eb7d($fileIdentifier, $file);
+            composerRequire740844413d66040dc31b51396d7da1ec($fileIdentifier, $file);
         }
 
         return $loader;
@@ -74,7 +74,7 @@ class ComposerAutoloaderInit003bc5bfffa29651294b88def978eb7d
  * @param string $file
  * @return void
  */
-function composerRequire003bc5bfffa29651294b88def978eb7d($fileIdentifier, $file)
+function composerRequire740844413d66040dc31b51396d7da1ec($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index a8e12f75e2..8c3d22b6e1 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit003bc5bfffa29651294b88def978eb7d
+class ComposerStaticInit740844413d66040dc31b51396d7da1ec
 {
     public static $files = array (
         'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@@ -393,8 +393,8 @@ class ComposerStaticInit003bc5bfffa29651294b88def978eb7d
         ),
         'League\\OAuth2\\Client\\' => 
         array (
-            0 => __DIR__ . '/..' . '/league/oauth2-client/src',
-            1 => __DIR__ . '/..' . '/league/oauth2-google/src',
+            0 => __DIR__ . '/..' . '/league/oauth2-google/src',
+            1 => __DIR__ . '/..' . '/league/oauth2-client/src',
         ),
         'League\\Csv\\' => 
         array (
@@ -738,11 +738,11 @@ class ComposerStaticInit003bc5bfffa29651294b88def978eb7d
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$prefixesPsr0;
-            $loader->fallbackDirsPsr0 = ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$fallbackDirsPsr0;
-            $loader->classMap = ComposerStaticInit003bc5bfffa29651294b88def978eb7d::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInit740844413d66040dc31b51396d7da1ec::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInit740844413d66040dc31b51396d7da1ec::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInit740844413d66040dc31b51396d7da1ec::$prefixesPsr0;
+            $loader->fallbackDirsPsr0 = ComposerStaticInit740844413d66040dc31b51396d7da1ec::$fallbackDirsPsr0;
+            $loader->classMap = ComposerStaticInit740844413d66040dc31b51396d7da1ec::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/vendor/composer/include_paths.php b/civicrm/vendor/composer/include_paths.php
index 39079afea8..189ce0e9b6 100644
--- a/civicrm/vendor/composer/include_paths.php
+++ b/civicrm/vendor/composer/include_paths.php
@@ -12,10 +12,10 @@ return array(
     $vendorDir . '/pear/console_getopt',
     $vendorDir . '/pear/pear-core-minimal/src',
     $vendorDir . '/pear/db',
+    $vendorDir . '/pear/log',
     $vendorDir . '/pear/mail',
     $vendorDir . '/pear/mail_mime',
     $vendorDir . '/pear/net_socket',
-    $vendorDir . '/pear/log',
     $vendorDir . '/pear/net_smtp',
     $vendorDir . '/pear/validate_finance_creditcard',
 );
diff --git a/civicrm/vendor/composer/installed.php b/civicrm/vendor/composer/installed.php
index 7bfc936fbc..ffe9b9c77e 100644
--- a/civicrm/vendor/composer/installed.php
+++ b/civicrm/vendor/composer/installed.php
@@ -5,7 +5,7 @@
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => '9c30653bc41a78a16ba8e2416eb76b89f1958554',
+        'reference' => '9ea8368ec4acaedf95fe22106dc975fcbb78a744',
         'name' => 'civicrm/civicrm-core',
         'dev' => true,
     ),
@@ -61,7 +61,7 @@
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => '9c30653bc41a78a16ba8e2416eb76b89f1958554',
+            'reference' => '9ea8368ec4acaedf95fe22106dc975fcbb78a744',
             'dev_requirement' => false,
         ),
         'civicrm/civicrm-cxn-rpc' => array(
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index e3b21b4410..e597e37996 100644
--- a/civicrm/xml/version.xml
+++ b/civicrm/xml/version.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.56.0</version_no>
+  <version_no>5.56.1</version_no>
 </version>
-- 
GitLab