WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 3 years ago

#22003 reopened defect (bug)

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

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

Description

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 (5)

#1 @ocean90
6 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
6 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
6 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
4 years ago

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

#5 @chriscct7
3 years ago

  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.