voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

does not select image after upgraded to version 5.5 #146

Open formulando opened 4 years ago

formulando commented 4 years ago

after upgraded to version 5.5 and plugin crashed when trying to choose images.

displays the error:

Uncaught ReferenceError: setPostThumbnailL10n is not defined at Object.setAsThumbnail (multi-post-thumbnails-admin.js?ver=c440fd0f5941d17b9a3e5658f4015e5b:31) at Object.cb (post-new.php?post_type=acompanhante:658) at h.Collection. (media-modal.js?ver=c440fd0f5941d17b9a3e5658f4015e5b:39) at p (backbone.min.js?ver=1.4.0:2) at f (backbone.min.js?ver=1.4.0:2) at l (backbone.min.js?ver=1.4.0:2) at h.Collection.n.trigger (backbone.min.js?ver=1.4.0:2) at h.Collection._onModelEvent (backbone.min.js?ver=1.4.0:2) at p (backbone.min.js?ver=1.4.0:2) at f (backbone.min.js?ver=1.4.0:2)

already tried the alternatives https://wordpress.org/support/topic/bugfix-bug-with-multiple-post-types-wp-4-5/

but I was not successful, I will downgrade the wp to see if it returns to normal.

did anyone experience the same problem?

formulando commented 4 years ago

If you have the same problem and have not found a solution. You can use the "WP Downgrade | Specific Core Version" plugin to revert to version 5.4.2 of the WP that works well

szczys commented 4 years ago

We have experienced the same behavior and downgraded to 5.4.2 until a solution can be found.

szczys commented 4 years ago

Looking at the wordpress code it seems that setPostThumbnailL10n has changed to wp.i18n. Here's the commit:

https://github.com/WordPress/WordPress/commit/4377e9a44e2c10ac66cb9cc49a4a3c8dff6a433f#diff-4bfa11da57ff2600004bb500368247f4

Looks like this is internationalization strings? https://codex.wordpress.org/I18n_for_WordPress_Developers

szczys commented 4 years ago

I have tested the changes in PR #148 with version 5.4.2 and it is working so no issue with users who have not yet made the 5.5 update.

aliciaduffy commented 4 years ago

This fixed the plugin for us in WordPress 5.5

ceprdata commented 4 years ago

I tested it and it didn't fix the plugin in 5.5. Hoping the plugin creator will test and correct the issue soon.

szczys commented 4 years ago

@ceprdata Some people are reporting that they needed to clear browser cache before the fix took effect.

undermeadow commented 4 years ago

@ceprdata We had to clear our Cloudflare cache, Varnish, and browser cache before it worked but it did finally work for us.

wenkunst commented 4 years ago

Works with WP 5.5! Great! :)