From c4666af30bbf536a1e1482d22318667c4a0fff78 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 17 Jan 2025 01:35:07 -0800 Subject: [PATCH] Social | Disable caching for publicize services list (#41149) * Social Disable caching for publicize services list * Add a comment --- ...ate-social-disable-caching-for-publicize-services-list | 4 ++++ .../publicize/src/class-publicize-script-data.php | 8 +++++++- ...ate-social-disable-caching-for-publicize-services-list | 4 ++++ ...ate-social-disable-caching-for-publicize-services-list | 4 ++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 projects/packages/publicize/changelog/update-social-disable-caching-for-publicize-services-list create mode 100644 projects/plugins/jetpack/changelog/update-social-disable-caching-for-publicize-services-list create mode 100644 projects/plugins/social/changelog/update-social-disable-caching-for-publicize-services-list diff --git a/projects/packages/publicize/changelog/update-social-disable-caching-for-publicize-services-list b/projects/packages/publicize/changelog/update-social-disable-caching-for-publicize-services-list new file mode 100644 index 0000000000000..40debb77fbcf2 --- /dev/null +++ b/projects/packages/publicize/changelog/update-social-disable-caching-for-publicize-services-list @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Social Disable caching for publicize services list to avoid stale nonces diff --git a/projects/packages/publicize/src/class-publicize-script-data.php b/projects/packages/publicize/src/class-publicize-script-data.php index 89ffe9f3131ba..3035e3e6b1d71 100644 --- a/projects/packages/publicize/src/class-publicize-script-data.php +++ b/projects/packages/publicize/src/class-publicize-script-data.php @@ -229,7 +229,13 @@ public static function get_shares_data() { * @return array List of external services and their settings. */ public static function get_supported_services() { - return Publicize_Services::get_all(); + /** + * Disable caching for now to avoid nonce errors + * for secondary users trying to connect an account + * + * @link https://github.com/Automattic/jetpack/pull/41149 + */ + return Publicize_Services::get_all( true /* Ignore cache */ ); } /** diff --git a/projects/plugins/jetpack/changelog/update-social-disable-caching-for-publicize-services-list b/projects/plugins/jetpack/changelog/update-social-disable-caching-for-publicize-services-list new file mode 100644 index 0000000000000..5ea7d21f9281b --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-social-disable-caching-for-publicize-services-list @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Social | Fix wordpress.com log in error when connecting Social accounts diff --git a/projects/plugins/social/changelog/update-social-disable-caching-for-publicize-services-list b/projects/plugins/social/changelog/update-social-disable-caching-for-publicize-services-list new file mode 100644 index 0000000000000..3445dbbab7f45 --- /dev/null +++ b/projects/plugins/social/changelog/update-social-disable-caching-for-publicize-services-list @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fixed wordpress.com log in error when connecting Social accounts