Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#6586 closed defect (bug) (worksforme)

WordPress 2.5 - Custom Field anomalies

Reported by: doodlebee's profile doodlebee Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords: custom fields
Focuses: Cc:


I scoured the forums and posted on the wp-testers list about this, but the only thing I've gotten is a response backing up that this is an issue (and not just mine) so I figured I should plop it in here.

Keeping it short and sweet - WP 2.5 has some serious issues with custom fields. Basically, they don't show up. I'm not talking about the other issue (like you can find here: - this is a whole different animal.

I add the custom fields in 2.5 - enter in a key and value, click "add custom field", and it does it's thinkg, working like it's adding it to the post or Page. But when I scroll down, it's gone. Clicking the dropdown only shows the podPress key. I did it a couple more times (thinking maybe that's what it took) but the same thing happened over and over again.

I looked in my database, and there were new entries added to the wp_meta table - as many new entries as attempts to add. So something's being written to the database - unfortunately it's the wrong thing. What it's doing is creating new key/value pairs in the database that are "_wp_page_template" (key) and "default" (value). Over and over again. No matter what I enter, they show up in there as that - NOT the stuff I entered. I tried to manually correct the information in the database itself, and the "value" took (but the value actually showed up in the dropdown - not the key), and the value still won't change.

Hopefully that makes sense!

Change History (6)

#1 @hughtodd
16 years ago

  • Priority changed from normal to high

I, too, have experienced this problem. When multiple custom field keys are selected, and values entered, some of them simply disappear when the post is saved or published. They must be entered all over again.

The post I found below suggests saving a post before using multiple custom fields:

But this workaround does not always do the trick.

#2 @DD32
16 years ago

  • Milestone set to 2.6

#3 @dreamyguy
16 years ago

Yes, same here. A "workaround" is to define only one custom field and save your post as pending. Then you can edit it and enter as many custom fields you want - all of them will be saved after you have saved your post at least once.

Don't even try to add more than one custom field before you've saved your post at least once. It won't work...

#4 @arminbw
16 years ago

If I want to fill some costum fields while writing a new article, everytime I add one, a draft will be stored in the database.

All these drafts do have different ids.

Every added custom field will point to these drafts, using the post_ids.

When I am finally finished writing the article and press "publish" only the very last custom field will be linked with article. The rest will point to drafts which are still stored in the database.

I hope this problem can be resolved soon, before every blogger clutters his database up.

#5 @dreamyguy
16 years ago

One thing I noticed yesterday:

After entering all the other data on my post, I entered the data on a single custom field, without adding it. Then I saved my post as "pending" and saw, after re-opening the post, that the custom field was added!

#6 @mrmist
15 years ago

  • Milestone 2.9 deleted
  • Priority changed from high to normal
  • Resolution set to worksforme
  • Severity changed from major to normal
  • Status changed from new to closed

Custom fields add properly for me in 2.7. Re-open if this is still a problem.

Note: See TracTickets for help on using tickets.