#3700 closed defect (bug) (duplicate)
Adding a custom field to an unsaved Page before publishing causes weirdness
Reported by: | markjaquith | Owned by: | Andy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3.2 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
As reported on my blog by "Kira":
- I start a new page and give it a title of “Forum” without the quotes, leaving the page content blank;
- I add a links_to custom field with a value of “http://www.kalunite.net/forum/” without the quotes;
- Click “Publish”;
The newly created page is not listed among the Pages; instead, it is saved as a post draft by WordPress. Furthermore, the title is “Draft created on January 27, 2007 at 10:51 am” instead of “Forum”.
More generically:
- Click "Write > Page"
- Move quickly for the next few steps
- Add a title (optional: content)
- Add a custom field key/value pair (click "Add Custom Field" after typing it in)
- Click "Publish"
What happens is that adding the custom field creates the Page as a POST draft, with a "Draft created on DATE at TIME" title. You have to move quickly because autosave appears to rectify this. clicking Publish does nothing, and your page seems to disappear (it has become a page draft).
Bit of an edge case, but still a valid bug.
Attachments (2)
Change History (21)
#2
@
17 years ago
- Owner changed from anonymous to Andy
- Version set to 2.1
Okay, add_meta_post_type.diff
helps passes along the post_type with the meta-add AJAX action and puts that into the post_type
when creating the temporary post...
BUT... nothing happens when clicking Publish (i.e. it is left as a Page Draft with the draft title), so something else is missing.
Andy, Mike A... help!
#3
@
17 years ago
I tested your patch using 2.2-bleeding and the default theme. It works fine for me, didn't see any JS errors thrown up or anything either.
#4
@
17 years ago
Yes, but it doesn't quite fix the problem. The page isn't published, and its contents aren't saved. All it does is prevent it from turning into a POST draft.
#7
in reply to:
↑ description
@
17 years ago
- Version changed from 2.1 to 2.1.3
I would like to say that I have this same bug appearing on my site. I'm running 2.1.3. I'll run through my steps:
1) Write Page
2) Enter title
3) enter content
4) uncheck "allow comments" and "allow pings"
5) set "Page status" to "Published"
6) scroll down, add custom field (whether or not I've already created it, I enter the values here)
7) click "Apply Custom Field"
8) scroll back up, hit "Publish"
9) the new Page does NOT appear in the "Pages" list. Instead, it shows up in the "Posts" list. Shows up as "Unpublished", title is changed to "Draft created on [date] at [time]"
Now, if I create the Page *without* a custom value, I have no problem. It'll save as a Page, and then I can go back in and add the custom field and everything is fine. But it sure adds some unnecessary steps.
#12
@
16 years ago
- Version changed from 2.1.3 to 2.3.2
I'd like to add this to posts now. I'm running WordPress 2.3.2, and have a custom fields system set up for a client. Our system is:
1) types in post title, post content, selects category
2) scrolls down and adds custom field information, hits "Add Custom Field". Nothing happens, but apparently the field is added (I'm used to seeing it show up somewhere when you add it - but it never does.)
3) Publish post.
what I *expect* is to the post is published. What happens is the post is saved as "Draft created on (whatever date) at (whatever time)" - all post data entered is lost.
As with the rest 0if I write the post and publish, then return to it and add the custom field, it's fine. Annoying to have to do this every time, though.
#14
@
16 years ago
- Cc guillep2k removed
Custom fields cause "publishing weirdness" on Pages even if you don't move quickly (as initially reported on this bug)... I've been working with Pages and custom fields on 2.5.1 and even with the trunk svn checkout, and everytime I try to add a custom field to a page I'm redirected to some other place... if, in fact, I go really quickly, before the auto-saving acts, clicking on "Add Custom Field" takes me to Write > Page, but none of the info I just entered it's there and I can't find that page anywhere... if I go slow and the page it's auto-saved before I add the new custom field, I get to Write > Page again, not to the Page I was editing, so I have to go to Manage > Pages and try to find it... The only "solution" I've found it's to write the info of the custom field and then, instead of clicking on "Add Custom Field", just click on "Save"... this, at least, works, but it feels totally primitive without the AJAX fireworks.
Maybe this should have a higher priority/severity level, since it leads to unpleasant loss of work... just my opinion
#16
@
15 years ago
- Component changed from Administration to Editor
- Keywords close added
has been rotting for quite a while
#17
@
14 years ago
- Keywords close removed
- Resolution set to worksforme
- Status changed from new to closed
Closing due to lack of traction.
#18
@
14 years ago
- Keywords needs-patch removed
- Milestone changed from 2.9 to 2.9.3
- Priority changed from normal to low
- Resolution worksforme deleted
- Severity changed from normal to minor
- Status changed from closed to reopened
- Version changed from 2.3.2 to 2.9.2
reopening this, as of 2.9.2 the bug is still there. It's pretty much as markjaquith has laid out.
- Create new post
- Add a custom field with anything you like. (don't forget the to click the add custom field button)
- Click Publish
You don't need a title, or content or anything else.
It also seems Wordpress travels into the future to create a title for you.
I've attached a screenshot.
Note: you must click "Add Custom Field" after filling in the custom field info