Ticket #6457 (new defect)

Opened 1 month ago

Last modified 1 week ago

New Post Using Multiple Custom Field creates unpublished posts and drafts

Reported by: elusivelight Assigned to: anonymous
Priority: highest omg bbq Milestone: 2.5.2
Component: Administration Version: 2.5.1
Severity: critical Keywords: custom fields has-patch needs-testing
Cc: pnaw10@pnaw10.com, guillep2k

Description

Using a new installation (2.5) with no plugins activated (system: Mac OS X 10.4 and Firefox 2), creating a new post with 6 custom fields, and hitting Publish caused 4 drafts and two unpublished posts to be created, each one showing one custom field. The original post only shows the last custom field.

Attachments

6457.diff (1.4 kB) - added by guillep2k on 05/04/08 01:30:59.

Change History

03/30/08 13:32:03 changed by fitztrev

03/30/08 21:10:07 changed by devilsoulblack

  • priority changed from normal to highest omg bbq.
  • version set to 2.5.
  • severity changed from normal to critical.
  • milestone changed from 2.7 to 2.5.1.

i have the same problem on 2.5 stable version

03/31/08 02:52:04 changed by devilsoulblack

hi this ist the video off that bug http://www.vimeo.com/842369 http://www.vimeo.com/842723

any idea how to solved ?

04/17/08 00:14:27 changed by Denis-de-Bernardy

likely related bug: I've occasionally had duplicate posts that were created when I made myself a coffee after starting to write a post. the bloody mess got autosaved, and when I clicked publish I ended up with a draft with the same title.

D.

04/22/08 20:25:21 changed by zogar

I have this problem all the DAYS!!!!

For weeks I m waiting a solution.

Please! Fix it!

04/27/08 07:56:19 changed by pnaw10

  • cc set to pnaw10@pnaw10.com.
  • keywords set to custom fields.
  • version changed from 2.5 to 2.5.1.

Reporting similar results. My template makes use of Custom Fields as well. Most pages require 2 Custom Field entries.

Anytime I try to enter two or more, it only saves the last one I entered. But if I try to enter one, then save, then enter the next one, the script hangs, and the page doesn't seem to get saved.

In addition to this, I'm also getting the "random drafts" being generated. Very confusing at first -- because pages that were published are also showing up in drafts, and I wasn't sure whether it would be safe to delete them. (Thankfully, the ones in "drafts" really ARE drafts, and deleting them will not affect your published posts.)

This has only happened since 2.5, and it still happens in 2.5.1.

Just saw the "workaround" posted at http://wordpress.org/support/topic/163769 (SAVE before you begin adding custom fields) but saving seems to be slow. I actually kinda think I like the pre 2.5 wp-admin better than the current one. The new one definitely looks nicer, but seems slower.

05/03/08 01:04:11 changed by guillep2k

This seems to happen when custom fields are added before the first save of the page/post. To temporarily avoid this behavior, you can save your page/post (not publish) before adding the first custom field.

05/04/08 01:30:59 changed by guillep2k

  • attachment 6457.diff added.

05/04/08 01:40:59 changed by guillep2k

  • cc changed from pnaw10@pnaw10.com to pnaw10@pnaw10.com, guillep2k.
  • keywords changed from custom fields to custom fields has-patch needs-testing.

This seems to happen when the user has javascript disabled OR for some reason the scripts for AJAX have not initialized for the page yet. The second HAS happened to me several times with this page. I don't think it's a slow connection problem because when it happened to me it was with a Wordpress installation in my intranet. You can tell because a full POST is performed, instead of an AJAX method.

This is easily reproductible if you disable Javascript and add metadata is your first action.

I had to make a double patch for this:

1) Disable the check at wp_insert_post() for content. Since metadata can be added without title/content/excerpt, this function should allow for it. OTHER CHECKS NEEDED, THOUGH!

2) Consider the fact that we don't have a good referrer in redirect_post().

(See attached patch). This solved the problem for me (at least testing with Firefox and JS disabled), but the effects should be evaluated by another developer more familiar with WP code.

05/05/08 01:03:35 changed by microtd

Same issue on WP 2.5.1, Mac OS X 10.5.2, Safari 3.1.1, PHP 5.2.3-1ubuntu6.3, Apache 2.2.4.