Make WordPress Core

Opened 12 years ago

Last modified 5 years ago

#22003 reopened defect (bug)

Saving custom fields goes to post-new.php rather than post.php

Reported by: curiousdannii's profile curiousdannii Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Posts, Post Types Keywords: needs-patch
Focuses: administration Cc:


Create a new post or page.
Add a title and message.
Add a custom field (click "Add Custom Field")

The post is saved, but as you are taken to post-new.php rather than post.php, it looks as if your post has disappeared! All is well - it is actually saved - but it's confusing.

Tested on 3.5-alpha-21989

Change History (6)

#1 @ocean90
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version trunk deleted

Duplicate of #21852 and #21152.

#2 @curiousdannii
12 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

I don't believe this is a duplicate of those... it looks to me like the bug is in wp-admin/post.php:

	} elseif ( isset($_POST['addmeta']) && $_POST['addmeta'] ) {
		$location = add_query_arg( 'message', 2, wp_get_referer() );

If I'm reading this code correctly then it just gets the referrer and sends the user back to post-new.php.

#3 @SergeyBiryukov
12 years ago

  • Component changed from General to Administration
  • Milestone set to Awaiting Review
  • Version set to 2.5

Fixing #21152 will restore AJAX in custom fields and eliminate the redirect.

The bug will still be present with JavaScript disabled though. The code was introduced in [7527].

#4 @nacin
10 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added

#5 @chriscct7
9 years ago

  • Keywords needs-patch added

#6 @donmhico
5 years ago

From what I can see, this bug is no longer valid. Can someone else confirm as well?

Note: See TracTickets for help on using tickets.