Enable jQuery Migrate Helper

説明

With the update to WordPress 5.5, a migration tool known as jquery-migrate was no longer enabled by default. This may lead to lacking functionality or unexpected behavior in some themes or plugins that run older code.

このプラグインは一時的なソリューションとして機能し、サイトの移行スクリプトを有効にして、プラグインやテーマの作者がコードを更新したり、テストしたりするための時間を与えます。

With the update to WordPress 5.6, the included version of jQuery is also upgraded. This means that old code that previously caused warnings now may instead may cause errors or stop working entirely.

Some of the features no longer working will just stop working behind the scenes without any apparent problem.

The plugin will let you downgrade to a previous version of jQuery for a period, but as a site administrator you are encouraged to get the underlying issue fixed.

インストール

  1. プラグインフォルダーにアップロードします。通常はwp-content/plugins/です。
  2. プラグイン画面でプラグインを有効化します
  3. それだけです!プラグインは残りを自動的に処理します。

FAQ

What does it mean that something is “deprecated”

スクリプト、ファイル、他のいくつかのコードは、開発者がより最新のコードに置き換えたり、完全に削除したりしている場合には、非推奨となります。

What happens after WordPress 5.6

With the release of WordPress 5.6, the jQuery version also gets updated. This means that plugins or themes that previously caused deprecation warnings now instead will cause errors.
This plugin will allow you to, temporarily, return to the previous version of jQuery if this happens (it will also try to do so automatically for website visitors the first time an error happens) allowing you to fix the code, or replace it.

ブラウザコンソールの見つけ方と使い方

WordPress.orgに、ブラウザのコンソールログを使用して JavaScript のエラーを診断するに関する記事があります。

The plugin isn’t logging deprecations or changing jQuery versions

If your site has any plugins for combining JavaScript files, or loading them asynchronously, this plugin may be negatively affected and not be able to operate as intended.

If your site requires this plugin to operate, please disable any plugins which interact with the loading of JavaScript files such as the types mentioned above. Once the underlying issue has been resolved, you may remove this plugin and re-enable those other tools.

How do I know if I need this plugin, or not

If something isn’t working correctly on your site after you upgraded WordPress, then you can simply try installing and activating this plugin. If this helps, then you leave this plugin activated and follow the instructions in the plugin. The plugin will tell you when you don’t need it any more.

There are a lot of deprecation warnings when using jQuery version 3

As jQuery version 3 is very new to WordPress, this is expected.

Deprecated notices means that the Migration tool is in place making sure these features still continue working while the related code is updated.

評価

2021年1月13日
Enabled it fixes all the jquery issues from the update BUT Backend forms are broken. JQMIGRATE: Migrate is installed with logging active, version 1.4.1 jquery-1.12.4-wp.js?ver=1.12.4-wp:2 Uncaught Error: Syntax error, unrecognized expression: https://film.ca/wp-admin/admin.php?page=wc-settings&tab=products at Function.ea.error (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at ea.tokenize (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at ea.select (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at Function.ea (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at Function.jQuery.find (jquery-migrate-1.4.1-wp.js?ver=1.4.1-wp:301) at n.fn.init.find (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at n.fn.init.jQuery.fn.find (jquery-migrate-1.4.1-wp.js?ver=1.4.1-wp:688) at jQuery.fn.init.n.fn.init (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at new jQuery.fn.init (jquery-migrate-1.4.1-wp.js?ver=1.4.1-wp:252) at n (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) wp-auth-check.min.js?ver=5.6:2 Uncaught TypeError: Cannot read property 'hasClass' of undefined at HTMLDocument.<anonymous> (wp-auth-check.min.js?ver=5.6:2) at HTMLDocument.dispatch (jquery-1.12.4-wp.js?ver=1.12.4-wp:3) at HTMLDocument.r.handle (jquery-1.12.4-wp.js?ver=1.12.4-wp:3) at Object.trigger (jquery-1.12.4-wp.js?ver=1.12.4-wp:3) at Object.jQuery.event.trigger (jquery-migrate-1.4.1-wp.js?ver=1.4.1-wp:644) at HTMLDocument.<anonymous> (jquery-1.12.4-wp.js?ver=1.12.4-wp:3) at Function.each (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at jQuery.fn.init.each (jquery-1.12.4-wp.js?ver=1.12.4-wp:2) at jQuery.fn.init.trigger (jquery-1.12.4-wp.js?ver=1.12.4-wp:3) at Object.<anonymous> (heartbeat.min.js?ver=5.6:2) When I disable the jquery migrate plugin the woocommerce backend functions properly again. jquery.min.js?ver=3.5.1:2 Uncaught Error: Syntax error, unrecognized expression: https://film.ca/wp-admin/admin.php?page=wc-settings&tab=products at Function.se.error (jquery.min.js?ver=3.5.1:2) at se.tokenize (jquery.min.js?ver=3.5.1:2) at se.select (jquery.min.js?ver=3.5.1:2) at Function.se (jquery.min.js?ver=3.5.1:2) at Function.s.find (jquery-migrate.min.js?ver=3.3.2:2) at S.fn.init.find (jquery.min.js?ver=3.5.1:2) at s.fn.init.S.fn.init (jquery.min.js?ver=3.5.1:2) at new s.fn.init (jquery-migrate.min.js?ver=3.3.2:2) at S (jquery.min.js?ver=3.5.1:2) at HTMLDocument.<anonymous> (options-custom.js?ver=5.6:19) se.error @ jquery.min.js?ver=3.5.1:2 se.tokenize @ jquery.min.js?ver=3.5.1:2 se.select @ jquery.min.js?ver=3.5.1:2 se @ jquery.min.js?ver=3.5.1:2 s.find @ jquery-migrate.min.js?ver=3.3.2:2 find @ jquery.min.js?ver=3.5.1:2 S.fn.init @ jquery.min.js?ver=3.5.1:2 s.fn.init @ jquery-migrate.min.js?ver=3.3.2:2 S @ jquery.min.js?ver=3.5.1:2 (anonymous) @ options-custom.js?ver=5.6:19 e @ jquery.min.js?ver=3.5.1:2 t @ jquery.min.js?ver=3.5.1:2 setTimeout (async) S.readyException @ jquery.min.js?ver=3.5.1:2 (anonymous) @ jquery.min.js?ver=3.5.1:2 e @ jquery.min.js?ver=3.5.1:2 t @ jquery.min.js?ver=3.5.1:2 setTimeout (async) (anonymous) @ jquery.min.js?ver=3.5.1:2 c @ jquery.min.js?ver=3.5.1:2 fireWith @ jquery.min.js?ver=3.5.1:2 fire @ jquery.min.js?ver=3.5.1:2 c @ jquery.min.js?ver=3.5.1:2 fireWith @ jquery.min.js?ver=3.5.1:2 t @ jquery.min.js?ver=3.5.1:2 setTimeout (async) (anonymous) @ jquery.min.js?ver=3.5.1:2 c @ jquery.min.js?ver=3.5.1:2 fireWith @ jquery.min.js?ver=3.5.1:2 fire @ jquery.min.js?ver=3.5.1:2 c @ jquery.min.js?ver=3.5.1:2 fireWith @ jquery.min.js?ver=3.5.1:2 ready @ jquery.min.js?ver=3.5.1:2 B @ jquery.min.js?ver=3.5.1:2 3?v=2.0:6 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403
2020年12月23日
I download this plugin a few months ago and fixed my wordpress site's issue (photo gallery)...my gallery stopped working recently so I checked this plugin and updated it. That didn't do the trick. I'm running the current version of WordPress, which is 5.6. Any suggestions?
2020年12月20日
It used to work in it's previous version of 1.2 somewhat ok, albeit slowing down the whole site significantly and with occasional errors (but still better than a broken site after the dropped wordpress jquery support) The newest version of 1.3 breaks the site on its own, might be due to some incompatibility issues with revolution slider, or visual bakery, but graphics are missing and errors are prevalent, again on a significantly slowed down site. Wish they never dropped the jquery support, even with this migration plugin not all plugin developer will update their work, and people will get stuck with broken slowed down sites and issues. Way to go, improvement of the finest.
95件のレビューをすべて表示

貢献者と開発者

Enable jQuery Migrate Helper はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Enable jQuery Migrate Helper” は15ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Enable jQuery Migrate Helper” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

v 1.3.0

  • Added legacy jQuery UI to be loaded if legacy jQuery is in use.
  • Added mention of site URLs in automatic emails.
  • Added option to enable/disable automatic downgrades.
  • Added logic to ensure only one downgrade request is sent per page load.
  • Updated logic around automatic downgrades for improved performance.
  • Fixed core deprecation notices being incorrectly labeled as undetermined inline ones.

v 1.2.0

  • Added settings page
  • Added option for downgrading to legacy jQuery
  • Added automatic downgrades
  • Added option to log deprecations in modern jQuery
  • Added e-mail notifications
  • Added weekly email digest of deprecations
  • Added option to allow logging deprecations from anonymous site visitors
  • Changed the handling of inline JavaScript code causing deprecation notices
  • Changed the admin bar to be two fixed links to avoid ever changing contexts
  • Changed the admin notices to be persistent when using legacy jQuery after upgrading to WordPress 5.6
  • Changed how concatenation is disabled, to address public-facing performance concerns
  • Fixed recommendation to remove plugin when not logging any deprecations having the wrong logic and not being displayed.

v 1.1.0

  • バックエンドで非推奨の通知を解除するオプションを追加
  • フロントエンドでの非推奨通知のロギングを追加
  • 非推奨が発生した場合に表示するための管理者バーのエントリを追加
  • ログに記録された非推奨のビューを追加
  • 非推奨がしばらく(1週間)記録されていない場合にプラグインを削除するようユーザーに促すダッシュボード通知を追加しました。
  • WordPress 5.6 が近づくにつれ、ダッシュボードのナグを表示する間隔を2週間から1週間に変更しました。

v 1.0.1

  • 管理者通知の1つが非表示にならないように修正しました。

v 1.0.0

  • 初回リリース。