Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 18 years ago

#1865 closed defect (bug) (wontfix)

Admin custom field key dropdown has hardcoded limit of 10

Reported by: coffee2code's profile coffee2code Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.6
Component: Administration Keywords: meta_key custom fields custom fields has-patch
Focuses: Cc:

Description

meta_form() in wp-admin/admin-functions.php, which is used in the admin post interface to create the "Add a new custom field:" section, has a hardcoded value of 10 as the LIMIT for the SQL request for meta keys. I've had numerous people contact me after they've exceeded having 10 custom fields and were wondering why some of their keys no longer appeared in the dropdown. My only recommendation has been to modify the core file.

Why was the meta keys dropdown field given such a small limit, or even one at all? Personally I'd favor dropping the LIMIT part of the query (attached as metakeys_no_limit.diff) or at least giving people a shot at changing it without modifying the core (attached as metakeys_filterable_limit.diff; in which the limit value is defined as:

$limit = apply_filters('meta_form_limit', 50);

(notice the default of 50)).

Another alternative would've been to make the value an option (with or without an interface field to allow changing it), but I didn't think that would fly as much.

-Scott

Attachments (2)

metakeys_no_limit.diff (574 bytes) - added by coffee2code 19 years ago.
Solution 1: Remove LIMIT clause all together
metakeys_filterable_limit.diff (685 bytes) - added by coffee2code 19 years ago.
Solution 2: Make LIMIT value filterable

Download all attachments as: .zip

Change History (6)

@coffee2code
19 years ago

Solution 1: Remove LIMIT clause all together

@coffee2code
19 years ago

Solution 2: Make LIMIT value filterable

#1 @coffee2code
19 years ago

  • Keywords bg|has-patch added

#2 @cnc137
19 years ago

Thank you for this patch. :) It fixed my disappearing custom fields that were driving me crazy. I can magically see them again. YAY! I wish this would've also fixed the ability to still see the "_encloseme" and "_pingme" custom fields on the "Write Post" page and over and over again in the database as I mention in Ticket #2316, but that is another story that will hopefully be fixed in 2.0.1???

Thanks again for the patch and info.

cnc137.

#3 @Nazgul
18 years ago

  • Keywords has-patch added; bg|has-patch removed
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket has been dead for a year.

If somebody has any opinions about this issue, they can reopen it or create a new one.

#4 @rob1n
18 years ago

Note that this has also been fixed since then (it's filtered).

Note: See TracTickets for help on using tickets.