Skip to content

(8.0) Blank Editor fix: Hardcoded inline javascript makes the editor go blank when defer loader is installed.  #10696

@BWunsch

Description

@BWunsch

Please give us a description of what happened.

Editor goes blank.

Please describe what you expected to happen and why.

Editor isn't blank.

How can we reproduce this behavior?

  1. Have a SEO optimized website.
  2. Learn about pagespeed and lighthouse, after which you install something that does deferred loading of javascript.
  3. Cry over Yoast 8.0 which has hardcoded inline javascript with dependencies, and thus crashes the editor.

FIX

The fix is that yoast should replace the offending line 221 in admin/class-admin-asset-manager.php and write a version which honors dependencies and the loading order (i.e put this in a javascript file marked with lodash as a dependency). I mean come on, Inline javascript like that is so 1995.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions