Make WordPress Core

Opened 6 weeks ago

#60976 new defect (bug)

register_block_type not working with Oxygen

Reported by: jfitatandem's profile jfitatandem Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

This is related to #59175 and [57675].

Oxygen forces returns get_template_directory() to return a non valid path, "fake". Since the introduction of the call to realpath in [57675], $template_paths_norm[ $template ] is set with the empty string that results from wp_normalize_path( realpath( get_template_directory() ) ). That causes the next if condition to always match, no matter what path the asset is in, therefore calling get_theme_file_uri on all of them.

Like in #59175, every block registered via register_block_type succeeds, but editorScript and editorStyle are not properly loaded in the editor because of the wrong—non existent—path.

Change History (0)

Note: See TracTickets for help on using tickets.