WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months ago

#40224 closed defect (bug) (fixed)

Twenty Seventeen: navigation.js should be enqueued with jQuery as dependency

Reported by: chesio Owned by: SergeyBiryukov
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-patch fixed-major
Focuses: Cc:

Description

Hi,

I run into an "jQuery is not defined" issue with Twenty Seventeen when I try to re-queue jQuery into footer, because /assets/js/navigation.js is enqueued without jQuery as dependency.

Fix is simple, I've attached a patch.

Cheers,
Česlav

Attachments (2)

40224.patch (900 bytes) - added by chesio 9 months ago.
40224.refreshed.patch (902 bytes) - added by chesio 9 months ago.

Download all attachments as: .zip

Change History (8)

@chesio
9 months ago

#1 @peterwilsoncc
9 months ago

  • Keywords has-patch needs-refresh added
  • Milestone changed from Awaiting Review to 4.7.4
  • Version changed from trunk to 4.7

@chesio,

Thanks for providing the patch.

Although the patch works, it doesn't meet the WordPress PHP coding standards which require spaces inside the brackets, ie array( 'jquery' ). The coding standards are in place to make reading the code easier for future developers.

I've marked the patch as needing a refresh and to be fixed in the next release.

#2 @chesio
9 months ago

  • Keywords needs-refresh removed

Hi @peterwilsoncc,

Thanks for pointing that out: refreshed patch attached.

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


9 months ago

#4 @SergeyBiryukov
9 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 40315:

Twenty Seventeen: Declare jQuery as a dependency for navigation.js.

Props chesio.
Fixes #40224.

#5 @SergeyBiryukov
9 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @swissspidy
8 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 40373:

Twenty Seventeen: Declare jQuery as a dependency for navigation.js.

Props chesio.
Fixes #40224.

Merges [40315] to the 4.7 branch.

Note: See TracTickets for help on using tickets.