[wp-trac] [WordPress Trac] #18068: wp_list_bookmarks orderby broke in WP 3.1.4 (submiting per Per Andrew Nacin)
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 11 16:04:25 UTC 2011
#18068: wp_list_bookmarks orderby broke in WP 3.1.4 (submiting per Per Andrew
Nacin)
-----------------------------+-----------------------------
Reporter: theideamechanic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: 3.1.4
Severity: major | Keywords: needs-patch
-----------------------------+-----------------------------
From: Andrew Nacin <nacin at wordpress.org>
Date: July 11, 2011 11:16:52 AM EDT
To: Doug Foster <doug at theideamechanics.com>
Subject: Re: if/how I should submit/track orderby bug in
wp_list_bookmarks()?
Hi Doug,
Please submit a report here: http://core.trac.wordpress.org. As soon as
possible today would be great for our timelines.
Andrew
On Mon, Jul 11, 2011 at 11:12 AM, Doug Foster <doug at theideamechanics.com>
wrote:
Hi Andrew,
I wanted to check back and ask if/how I should submit this as a bug and
track it. What would you suggest?
Thanks!
Doug
On Jul 1, 2011, at 12:38 PM, Doug Foster wrote:
Hi Andrew,
...
The Codex
(http://codex.wordpress.org/Function_Reference/wp_list_bookmarks) implies
you would use "id" vs. the database field "link_id" as you mention, but in
my searching I also found this kinda related issue
(http://wordpress.org/support/topic/problem-with-orderby-in-
wp_list_bookmarks).
You're right about the approach I took or My Link Order takes, but if you
want to order links (a very reasonable thing to do) it looks like it is a
common practice, and the Codex implies it is (or should be) a workable
option. I guess the real question is a clean way to do it, literally like
a sort-order field. And a Codex page that matches the functionality.
I'll try using link_id and deleting all the links and then re-entering
those. Bummer, for my site and the ones I support that's gonna take some
time.
...
Doug
On Jul 1, 2011, at 12:07 PM, Andrew Nacin wrote:
Hi Doug,
We couldn't have predicted that one, that's for sure. Orderby options
weren't removed as much as they were whitelisted. Nearly every field
remains sortable, but notes is a text field, so we couldn't have expected
anyone to be ordering by that. (In fact, ordering by MySQL TEXT fields is
pretty much a no-no.)
orderby=id didn't appear to have ever worked, but orderby=link_id works
fine.
My Link Order adds a new column to the database. Ugly. Unfortunately
there's no easy way to fix that from our end. But I'll take a look.
Andrew
On Fri, Jul 1, 2011 at 12:00 PM, Doug Foster <doug at theideamechanics.com>
wrote:
Hi Andrew,
...
Upgrading from WP 3.1.3 to 3.1.4 broke the ability to sort links by notes
using wp_list_bookmarks orderby=notes (I assume the same holds true for
get_bookmarks too).
I found this post (http://wordpress.org/support/topic/plugin-my-link-
order-wordpress-update-broke-my-order).
Reading this (http://permalink.gmane.org/gmane.comp.security.full-
disclosure/80532) makes me think some of the orderby options were removed
to address this threat.
It does seem that (other than name) rating still works, but that appears
to be the only one. For a while I thought it was just that you could not
orderby any field with a varchar type, but it appears that even orderby=id
(which is bigint(20) type) doesn't work.
So, if you have many links (like I do on http://theideamechanic.com) – and
used to orderby=notes – you're left looking for a work around:
I could put a number in the name but that looks ugly and hacky
I could use rating but you're limited to 10 links (I have more in my
"Getting Started" category
I could write a query to pull links direct from the database, but that
kinda defeats the abstraction of having the wp_list_bookmarks template
tag.
...
Doug
Doug Foster
the Idea Mechanics
1773 NW Maynard, Cary NC 27513
phone: (919) 373-4311
Skype, AIM, Twitter: theideamechanic
Everyone sells, even you.
Learn how @ http://theideamechanic.com
Need help? We help people sell: http://theideamechanics.com
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18068>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list