From 3db7018c06e9ba77b98969a209c5535ebf2e6de0 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 7 Feb 2025 11:28:38 -0500 Subject: [PATCH 1/3] fix: Catch null content errors There are contexts where the JavaScript runtime appears to send null values to the host app. It could be performance related, but we should catch the errors nonetheless. --- gradle/libs.versions.toml | 2 +- .../android/editor/gutenberg/GutenbergKitEditorFragment.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8f7d7bc1cb5d..f867803feb42 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -72,7 +72,7 @@ google-play-services-auth = '20.4.1' google-services = '4.4.2' gravatar = '2.2.0' greenrobot-eventbus = '3.3.1' -gutenberg-kit = 'trunk-7a9a66ce400ef1baaa2d098c0f8c95ffe1f42f81' +gutenberg-kit = '80-5c06c93df87aec38c6114766ccd3fda502c8dc77' gutenberg-mobile = 'v1.121.0' indexos-media-for-mobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a' jackson-databind = '2.12.7.1' diff --git a/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergKitEditorFragment.java b/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergKitEditorFragment.java index 5c127f5b047c..d87658f0ff7f 100644 --- a/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergKitEditorFragment.java +++ b/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergKitEditorFragment.java @@ -331,9 +331,9 @@ public Pair getTitleAndContent(CharSequence original final Pair[] result = new Pair[1]; final CountDownLatch latch = new CountDownLatch(1); - mGutenbergView.getTitleAndContent(new TitleAndContentCallback() { + mGutenbergView.getTitleAndContent(originalContent, new TitleAndContentCallback() { @Override - public void onResult(@Nullable String title, @NonNull String content) { + public void onResult(@NonNull CharSequence title, @NonNull CharSequence content) { result[0] = new Pair<>(title, content); latch.countDown(); } From 257e008b5a5ea2d6605f8531c6e87c5c471dc082 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 7 Feb 2025 14:56:02 -0500 Subject: [PATCH 2/3] docs: Add release note --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 6ee51095597c..d907ccce8d41 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -4,6 +4,7 @@ ----- * [*] Fix unselectable group blocks in the experimental editor [https://github.com/wordpress-mobile/GutenbergKit/pull/68] * [*] Prevent resetting content in the experimental editor when the device orientation changes [#21662] +* [*] Fix an interiment experimental editor crash while saving changes [#21673] 25.7 ----- From 3c28b1a397cb8186733ddbb7460c6c36319627a0 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 7 Feb 2025 15:28:40 -0500 Subject: [PATCH 3/3] build: Update GutenbergKit ref --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f867803feb42..51b06572be02 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -72,7 +72,7 @@ google-play-services-auth = '20.4.1' google-services = '4.4.2' gravatar = '2.2.0' greenrobot-eventbus = '3.3.1' -gutenberg-kit = '80-5c06c93df87aec38c6114766ccd3fda502c8dc77' +gutenberg-kit = 'trunk-7894ff454cf2a889dd4634e031c1a0323d7f3d08' gutenberg-mobile = 'v1.121.0' indexos-media-for-mobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a' jackson-databind = '2.12.7.1'