Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all scripts hooked into after_wp_tiny_mce #5686

Merged
merged 1 commit into from Sep 12, 2018

Conversation

Projects
None yet
3 participants
@jeherve
Copy link
Contributor

commented Sep 6, 2018

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Summary

This PR can be summarized in the following changelog entry:

  • Remove all scripts hooked after the Tiny MCE editor.

Description

Some plugins add their own scripts that depend on Tiny MCE by hooking into the after_wp_tiny_mce hook:
https://developer.wordpress.org/reference/hooks/after_wp_tiny_mce/

This causes some issues when the scripts rely on JavaScript for example.
Since Elementor removed all other enqueues that come on that page, it causes errors. Removing those scripts solves the issue.

Here is an example of such an error:
Automattic/jetpack#9989

Test instructions

This PR can be tested by following these steps:

  1. Use plugin Elementor and Jetpack.
  2. Activate Markdown support in Jetpack (under Jetpack > Settings, search for "Markdown" and activate)
  3. Edit page with Elementor
  4. You should not see any JavaScript errors on the page.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended
  • Docs have been added / updated (for bug fixes / features)
Remove all scripts hooked into after_wp_tiny_mce
Some plugins add their own scripts that depend on Tiny MCE by hooking into the `after_wp_tiny_mce` hook:
https://developer.wordpress.org/reference/hooks/after_wp_tiny_mce/

This causes some issues when the scripts rely on JavaScript for example.
Since Elementor removed all other enqueues that come on that page, it causes errors. Removing those scripts solves the issue.
@CLAassistant

This comment has been minimized.

Copy link

commented Sep 6, 2018

CLA assistant check
All committers have signed the CLA.

@KingYes KingYes changed the base branch from master to release/2.2.2 Sep 12, 2018

@KingYes KingYes merged commit c56477b into elementor:release/2.2.2 Sep 12, 2018

19 of 20 checks passed

ci/circleci: php-js-lints Your tests failed on CircleCI
Details
ci/circleci: php54-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php54-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php54-wp48-build Your tests passed on CircleCI!
Details
ci/circleci: php55-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php55-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php55-wp48-build Your tests passed on CircleCI!
Details
ci/circleci: php56-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php56-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php56-wp48-build Your tests passed on CircleCI!
Details
ci/circleci: php70-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php70-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php70-wp48-build Your tests passed on CircleCI!
Details
ci/circleci: php71-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php71-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php71-wp48-build Your tests passed on CircleCI!
Details
ci/circleci: php72-wp-latest-build Your tests passed on CircleCI!
Details
ci/circleci: php72-wp47-build Your tests passed on CircleCI!
Details
ci/circleci: php72-wp48-build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
@KingYes

This comment has been minimized.

Copy link
Member

commented Sep 12, 2018

Thanks

@jeherve jeherve deleted the jeherve:fix/conflict-tinymce-hooks branch Sep 12, 2018

@jeherve jeherve restored the jeherve:fix/conflict-tinymce-hooks branch Sep 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.