Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#62146 closed defect (bug) (fixed)

WordPress 6.7.0 beta1 is failing to load scripts.

Reported by: nendeb55 Owned by: jonsurrell
Priority: normal Milestone: 6.7
Component: Script Loader Version: 6.7
Severity: normal Keywords: has-patch
Cc: Focuses: javascript

Description

Attachments (1)

Screenshot 2024-10-01 at 7.34.03 PM.png​ (52.7 KB ) - added by pratiklondhe 2 years ago.
Replicating the error

Download all attachments as: .zip

Change History (11)

#1 @gziolo
2 years ago

  • Component General → Interactivity API
  • Milestone Awaiting Review → 6.7

#2 @jonsurrell
2 years ago

  • Component Interactivity API → General
  • Milestone 6.7 → Awaiting Review
  • Owner set to jonsurrell
  • Status new → assigned

Thanks for the report, I'll prepare a patch.

#3 @jonsurrell
2 years ago

  • Focuses javascript added
  • Milestone Awaiting Review → 6.7

This ticket was mentioned in ​PR #7471 on ​WordPress/wordpress-develop by ​@jonsurrell.


2 years ago
#4

  • Keywords has-patch added

[59083] introduced an issue where Script Modules registered src does not correctly respect the includes path.

Before that change, script modules were registered using includes_url. The patch used a hard-coded path which breaks when sites are not served from the root, e.g. the site root is https://example.com/wp instead of https://example.com/.

Follow-up to [59083]
Fixes #62146

Trac ticket: https://core.trac.wordpress.org/ticket/62146

#6 @swissspidy
2 years ago

  • Component General → Script Loader
  • Severity critical → normal

#7 @pratiklondhe
2 years ago

Test Report

PR tested: ​https://github.com/WordPress/wordpress-develop/pull/7471

Environment

  • OS: macOS Sonoma 14.3.1
  • WordPress Version: Trunk branch
  • Browser: Mozilla Firefox 130.0.1

Actual Results

After checking out the PR and building, the previously encountered script loading error no longer occurs.

Additional Notes

  • The error was replicable when the WordPress site’s URL differed from the installation directory, i.e., WordPress was located at wptrunk.local/build instead of the top-level domain wptrunk.local.
  • This behavior was consistent with what the original reporter observed.
  • above is an image showing the error before checking out the PR

#8 @cbravobernal
2 years ago

  • Resolution → fixed
  • Status assigned → closed

In 59154:

Script Modules: prevent broken links by using includes_url.

[59083] introduced an issue where Script Modules registered src does not correctly respect the includes path.

Before that change, script modules were registered using includes_url. The patch used a hard-coded path which breaks when sites are not served from the root, e.g. the site root is ​https://example.com/wp instead of ​https://example.com/.

Follow-up to [59083].

Props nendeb55, jonsurrell, cbravobernal.

Fixes #62146.

This ticket was mentioned in ​Slack in #core by desrosj. ​View the logs.


2 years ago

Note: See TracTickets for help on using tickets.