Ticket #1865 (closed defect: wontfix)

Opened 3 years ago

Last modified 1 year ago

Admin custom field key dropdown has hardcoded limit of 10

Reported by: coffee2code Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 1.6
Severity: normal Keywords: meta_key custom fields custom fields has-patch
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

metakeys_no_limit.diff (0.6 kB) - added by coffee2code on 11/11/05 06:52:53.
Solution 1: Remove LIMIT clause all together
metakeys_filterable_limit.diff (0.7 kB) - added by coffee2code on 11/11/05 06:53:46.
Solution 2: Make LIMIT value filterable

Change History

11/11/05 06:52:53 changed by coffee2code

  • attachment metakeys_no_limit.diff added.

Solution 1: Remove LIMIT clause all together

11/11/05 06:53:46 changed by coffee2code

  • attachment metakeys_filterable_limit.diff added.

Solution 2: Make LIMIT value filterable

11/11/05 06:55:36 changed by coffee2code

  • keywords changed from meta_key custom fields to meta_key custom fields custom fields bg|has-patch.

01/31/06 22:41:33 changed by cnc137

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.

03/20/07 10:20:20 changed by Nazgul

  • keywords changed from meta_key custom fields custom fields bg|has-patch to meta_key custom fields custom fields has-patch.
  • status changed from new to closed.
  • resolution set to wontfix.

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.

06/12/07 22:21:04 changed by rob1n

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