Asset CDN: Fix json translation loading#10982
Conversation
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 10, 2019. |
|
I am not quite sure how to test this. When running a development version of WordPress, the Asset CDN is not applied because that version of WP is not available in a tag. I can use the add_filter( 'jetpack_cdn_core_version_and_locale', function( $values ) {
return array( '5.0.1', 'fr_FR' );
} );But if I do so, the editor does not load at all for me because I am trying to load the block editor from the Alpha version of WP with some outdated JS from the 5.0.1 version of WP. How did you manage to test this? Am I missing something here? |
|
Hm, at the time when I tested this, the 5.0.1 cdn version was compatible. I guess this means that it's now only possible to test this with a 5.0.1 install and not an alpha. |
|
👍 So I should have a 5.0.1 + manually apply the patch in https://core.trac.wordpress.org/changeset/44209 ? |
|
Yes, exactly! |
9b1bfdb to
a66d67e
Compare
|
@jeherve I updated the patch, the filter was missing two parameters which caused a fatal. Maybe that broke Gutenberg for you? I just tried with a trunk WordPress and and it loads up fine for me. |
jeherve
left a comment
There was a problem hiding this comment.
It works well for me. There is just a tiny indenting issue!
modules/photon-cdn.php
Outdated
| * Ensure use of the correct relative path when determining the JavaScript file names. | ||
| * | ||
| * @param string $relative The relative path of the script. False if it could not be determined. | ||
| * @param string $src The full source url of the script. |
There was a problem hiding this comment.
Spacing is odd here, I think there may be spaces instead of tabs.
…Automattic/jetpack into fix/cdn-broken-json-translation-loading
|
@jeherve the indentation should be fixed now, thanks for testing! |
* Add first version of the Changelog and testing list for 6.9 * Changelog: add #10710 * changelog: add #10538 * changelog: add #10741 * changelog: add #10749 * changelog: add #10664 * changelog: add #10224 * changelog: add #10788 * Changelog: add #10560 * Chanegelog: add #10812 * changelog: add #10556 * Changelog: add #10668 * Changelog: add #10846 * Changelog: add #10947 * Changelog: add #10962 * Changelog: add #10956 * Changelog: add #10940 * Changelog: add #10934 * Changelog: add #10912 * changelog: add #10866 * changelog: add #10924 * Changelog: add #10936 * Changelog: add #10833 * changelog: add #10867 * Changelog: add #10960 * Changelog: add #10888 * changelog: add #10840 * changelog: add #10972 * Changelog: add #10979 * changelog: add #10909 * Changelog: add #10958 * Changelog: add #10981 * Changelog: add #10564 * Changelog: add #10809 * Changelog: add #10982 * Changelog: add #10706 * Changelog: add #10978 * Changelog: add #10132 * Changelog: add #11022 * Changelog: add #11024 * Changelog: add #10875 * Changelog: add #11030 * Changelog: add #11053 * Changelog: add #10880 * Changelog: add #9359 * Changelog: add #11037 * Update block list * Changelog: add #11060 * Changelog: add #10755 * changelog: add #11000 * Changelog: add #10786 * Changelog: add #10945 * Changelog: add #10597

When the static asset CDN of Jetpack is loaded, the translations for Gutenberg don'tt load properly because the filename is generated for a wrong path.
Also fixes Automattic/wp-calypso#29309
This has been extensively discussed in https://core.trac.wordpress.org/ticket/45528
Changes proposed in this Pull Request:
Testing instructions:
Prequisit: WordPress 5.0.2(alpha) or trunk
Proposed changelog entry for your changes: