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
Merged

Remove all scripts hooked into after_wp_tiny_mce #5686

merged 1 commit into from Sep 12, 2018

Conversation

@jeherve
Copy link
Contributor

@jeherve jeherve 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)
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
Copy link

@CLAassistant CLAassistant commented Sep 6, 2018

CLA assistant check
All committers have signed the CLA.

Loading

@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
Loading
@KingYes
Copy link
Member

@KingYes KingYes commented Sep 12, 2018

Thanks

Loading

@jeherve jeherve deleted the fix/conflict-tinymce-hooks branch Sep 12, 2018
@jeherve jeherve restored the 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants