Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32858 closed defect (bug) (fixed)

Customizer Menus: Original link is not populated for newly-added menu items

Reported by: westonruter's profile westonruter Owned by: valendesigns's profile valendesigns
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords: has-patch needs-testing
Focuses: Cc:

Description

The nav_menu_item control has a template for the Original link:

<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>

When adding a new nav menu item, however, this url is not among the properties that is exported from Ajax, and so the result is an empty href.

Originally noticed as part of #32711.

Attachments (1)

32858.diff (3.8 KB) - added by valendesigns 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @valendesigns
9 years ago

  • Owner set to valendesigns
  • Status changed from new to assigned

I'll take a look at this tomorrow.

@valendesigns
9 years ago

#2 @valendesigns
9 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

@westonruter 32858.diff solves the issue. Please test and commit when you get a moment. I'll need to update the patch for #32687 as I've added url to the return array and standardized the key order, so the tests will no longer pass. I think this should land first and then I'll refresh the other patch right after.

#3 @westonruter
9 years ago

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

In 33089:

Customizer: Ensure that a newly-added nav menu item gets the Original link populated in its control.

Props valendesigns.
Fixes #32858.

#4 @westonruter
9 years ago

(Due to my typo, the last commit [33094] referencing this ticket should have actually referenced #32672 as fixed instead.)

Note: See TracTickets for help on using tickets.