Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22216 closed defect (bug) (fixed)

Links widget does not display links if no Link Categories exist.

Reported by: mfields's profile mfields Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

Here are the steps I used to detect this running on the latest trunk:

  1. Ensure that the 'link_manager_enabled' option has a value of "1".
  2. Ensure that no Link Categories exist (default behaviour after Step 1).
  3. Add a single link via Links -> Add New.
  4. Create an instance of the Links widget in the sidebar.
  5. View your site.

At this stage, the Links widget should not display.

I believe that this problem exists because there is no default link category. The dropdown element in the widget's UI labeled "Select Link Category" can only be set to "All links". When this happens, the query in wp_list_bookmarks() returns no results. Prior to 3.5 there has always been a "Blogroll" Link Category which appears to have worked much like the default posts category. I think that the absence of a default Link Category may be part of the problem here.

Attachments (2)

22216.diff (421 bytes) - added by MikeHansenMe 12 years ago.
Here is a start.
22216.2.diff (1.1 KB) - added by ryan 12 years ago.

Download all attachments as: .zip

Change History (10)

#1 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5

@MikeHansenMe
12 years ago

Here is a start.

#2 @MikeHansenMe
12 years ago

  • Cc mdhansen@… added

#3 @helenyhou
12 years ago

  • Keywords has-patch added

#4 @bpetty
12 years ago

Even though this appears to have been a problem in 3.4 and older, it's still basically a regression because of the change in default link categories (not having them anymore). I'd bump priority, but it's also still only a problem for anyone re-enabling the link manager, which should be very few.

This should still be addressed for 3.5 though. I've tested the patch and it works.

#5 @nacin
12 years ago

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

In 22426:

Display links if no link categories exist. props MikeHansenMe. fixes #22216.

#6 @ryan
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This breaks the links widget. categorize is stomped.

@ryan
12 years ago

#7 @ryan
12 years ago

Tested with link categories and with all link categories deleted. Categorized for the former, one list for the latter.

#8 @nacin
12 years ago

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

[22910] missed the ticket.

Note: See TracTickets for help on using tickets.