WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 3 months 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:
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 (4)

comment:1 ocean9019 months ago

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

Duplicate of #21852 and #21152.

comment:2 curiousdannii19 months 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.

comment:3 SergeyBiryukov19 months 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].

comment:4 nacin3 months ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added
Note: See TracTickets for help on using tickets.