Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#40224 closed defect (bug) (fixed)

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

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

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 10 years ago.
40224.refreshed.patch​ (902 bytes ) - added by chesio 10 years ago.

Download all attachments as: .zip

Change History (8)

@chesio
10 years ago

#1 @peterwilsoncc
10 years ago

  • Keywords has-patch needs-refresh added
  • Milestone Awaiting Review → 4.7.4
  • Version trunk → 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
10 years 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.


10 years ago

#4 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 40315:

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

Props chesio.
Fixes #40224.

#5 @SergeyBiryukov
10 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

#6 @swissspidy
10 years ago

  • Resolution → fixed
  • Status reopened → 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.