Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#62146 closed defect (bug) (fixed)

WordPress 6.7.0 beta1 is failing to load scripts.

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

Attachments (1)

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

Download all attachments as: .zip

Change History (11)

#1 @gziolo
7 months ago

  • Component changed from General to Interactivity API
  • Milestone changed from Awaiting Review to 6.7

#2 @jonsurrell
7 months ago

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

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

#3 @jonsurrell
7 months ago

  • Focuses javascript added
  • Milestone changed from Awaiting Review to 6.7

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


7 months 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
7 months ago

  • Component changed from General to Script Loader
  • Severity changed from critical to normal

@pratiklondhe
7 months ago

Replicating the error

#7 @pratiklondhe
7 months 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
7 months ago

  • Resolution set to fixed
  • Status changed from assigned to 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.


7 months ago

Note: See TracTickets for help on using tickets.