WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 10 months ago

#21829 closed defect (bug) (fixed)

Custom Field "Update" button failure

Reported by: BaronHigbee Owned by: BaronHigbee
Milestone: 3.4.3 Priority: high
Severity: critical Version: 3.4.2
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

I have done my best to search and test and the "Update" button located in all Custom Fields is not functioning with the latest update of the WordPress core. The button vanishes when pressed and does not update the Custom Field.

Additionally it creates a "button artifact" at the bottom of the Custom Field list that looks like another "update" button and even functions like one, but still does nothing.

I have tested it on multiple computers and multiple browsers. All PCs with FF, Safari, Chrome, IE, and Opera.

I have also tested with separate servers and websites with the same result. I've done my best to fix it, but I can't find the problem.

THIS IS A BUG FOR VERSION 3.4.2 - which is not yet listed on Trac

Attachments (8)

wp-bug.jpg (54.0 KB) - added by BaronHigbee 3 years ago.
Image of the problem
add-custom-field-bug.png (33.3 KB) - added by sethta 3 years ago.
Image of Add Custom Field "button artifact"
21829.patch (2.0 KB) - added by SergeyBiryukov 3 years ago.
21829.34-branch.patch (2.2 KB) - added by ocean90 3 years ago.
Patch for the 3.4 branch.
fix-custom-fields-in-wp342.php (745 bytes) - added by SergeyBiryukov 3 years ago.
Screen Shot 2012-09-08 at 7.10.00 PM.png (16.8 KB) - added by Amit_k 3 years ago.
update custom field button (mess)
custom-fields-bug.jpg (57.2 KB) - added by tahrirsquare 3 years ago.
Custom fields bug
21829.34-branch.2.patch (3.1 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (54)

@BaronHigbee3 years ago

Image of the problem

comment:1 @sethta3 years ago

I have also noticed this same issue as of 3.4.2. I have tested and confirmed it on three separate sites, checking before the upgrade where it works, and after where it doesn't.

It is only possible to update custom fields through changing the value in the editor and then clicking Save Draft/Publish/Update.

In addition the the update button not working, the Add Custom Field button does the exact same thing where it becomes a "button artifact", meaning that no new custom fields can be added through the Custom Fields meta box.

@sethta3 years ago

Image of Add Custom Field "button artifact"

comment:2 @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.5

Broken in [21205] :(

@SergeyBiryukov3 years ago

comment:3 @SergeyBiryukov3 years ago

  • Keywords has-patch needs-testing added

comment:4 @SergeyBiryukov3 years ago

Currently, multiple Update buttons have the same ID (#updatemeta).

21829.patch fixes that as well.

comment:5 @BaronHigbee3 years ago

Attempted the patching but the problems remained

comment:6 follow-up: @BaronHigbee3 years ago

Also plz note - the final code change was for wp-lists.dev.js NOT for wp-lists.js

comment:7 @garscott3 years ago

I applied the patch and the update button and add custom field works on 3.4.2. Thanks.

comment:8 @c3mdigital3 years ago

  • Keywords needs-testing removed

Patch tested against 3.4.2 and r21780. Fixes broken update and add custom field button.

comment:9 in reply to: ↑ 6 @SergeyBiryukov3 years ago

Replying to BaronHigbee:

Also plz note - the final code change was for wp-lists.dev.js NOT for wp-lists.js

The patch is for current trunk (http://wordpress.org/download/svn/).

To test on 3.4.2:

  1. Apply the same change to wp-lists.dev.js.
  2. Add this line to your wp-config.php file:
    define('SCRIPT_DEBUG', true);
    
    http://codex.wordpress.org/Debugging_in_WordPress#SCRIPT_DEBUG

comment:10 @ocean903 years ago

  • Priority changed from normal to highest omg bbq

[21717] for the 3.4 branch.

comment:11 @toscho3 years ago

  • Cc info@… added

comment:12 @ocean903 years ago

  • Version changed from trunk to 3.4.2

@ocean903 years ago

Patch for the 3.4 branch.

comment:13 follow-up: @nacin3 years ago

Pretty incredible this was broken for two months in trunk.

This looks like Hotfix material. But... I also understand how often users use Custom Fields (to the partially understandable chagrin of developers everywhere). So let's put something together for Hotfix if possible (be creative) and then look to see if a 3.4.3 is needed due to demand.

comment:14 @nacin3 years ago

  • Milestone changed from 3.5 to 3.4.3

comment:15 in reply to: ↑ 13 @SergeyBiryukov3 years ago

Replying to nacin:

So let's put something together for Hotfix if possible (be creative)

fix-custom-fields-in-wp342.php is a hacky workaround I've been testing.

comment:16 @BaronHigbee3 years ago

@Sergey yep that was my WP dev noob mistake... patch applied and script_debug set to true. Patch works and all is functioning :)

comment:18 @nacin3 years ago

In [21781]:

Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk.

comment:19 @nacin3 years ago

Let's make sure [21781] works for all uses of wp-lists.

Looks like neither admin-categories nor admin-custom-fields are even used anymore. Still, it's listed as a dependency on edit-comments.js, post.js, link.js, and nav-menu.js.

comment:20 follow-up: @nacin3 years ago

Hotfix 0.9 is now out, and will fix these issues with WordPress 3.4.2: http://wordpress.org/extend/plugins/hotfix/. (http://plugins.trac.wordpress.org/changeset/596040)

Once we can confirm [21781] is a complete fix with no lingering bugs, we can port that to the 3.4 branch. No timeline or current plans for 3.4.3.

@Amit_k3 years ago

update custom field button (mess)

comment:21 in reply to: ↑ 20 @Asif2BD3 years ago

Replying to nacin:

Hotfix 0.9 is now out, and will fix these issues with WordPress 3.4.2: http://wordpress.org/extend/plugins/hotfix/. (http://plugins.trac.wordpress.org/changeset/596040)

Once we can confirm [21781] is a complete fix with no lingering bugs, we can port that to the 3.4 branch. No timeline or current plans for 3.4.3.

So planing to release directly 3.5? no quick 3.4.3?

comment:22 @nacin3 years ago

  • Priority changed from highest omg bbq to high

While there may be a 3.4.3, I don't think there will be a quick one. I haven't been notified of many reports in the support forums, and anyone who is having trouble has been pointed to Hotfix.

comment:23 @tar.gz3 years ago

  • Cc code@… added

comment:24 @fjarrett3 years ago

  • Cc fjarrett@… added

comment:25 @meloniq3 years ago

  • Cc meloniq@… added

comment:26 @peterjanes3 years ago

  • Cc trac.wordpress.org@… added

Neither the patch (which I applied to the .dev files and manually applied to the non-.devs) nor the Hotfix plugin solves the issue for me. I've found that both add and update will work with this change to Hotfix, though:

-		$('#postcustomstuff').on('hover focus', '#addmetasub, #updatemeta', function() {
+		$('#postcustomstuff').on('hover focus', '#newmeta-submit, .updatemeta', function() {

comment:27 @nacin3 years ago

#newmeta-submit was added in 3.5.

comment:28 follow-up: @peterjanes3 years ago

That would explain why the hotfix for 3.4.2 doesn't work, then. If not a 3.4.3 release of WordPress, then perhaps a 0.9.1 for the plugin?

comment:29 in reply to: ↑ 28 @nacin3 years ago

Replying to peterjanes:

That would explain why the hotfix for 3.4.2 doesn't work, then. If not a 3.4.3 release of WordPress, then perhaps a 0.9.1 for the plugin?

Hotfix works fine for me with 3.4.2. My point was that #newmeta-submit is not present in 3.4.2, so changing the selector from #addmetasub to #newmeta-submit likely means one of two things:

  • You've modified your WordPress install, perhaps by applying a patch from above (or are running an early version of 3.5)
  • Simply removing #addmetasub (and not replacing it with #newmeta-submit) fixes it for you

comment:30 follow-up: @peterjanes3 years ago

Please note that the hotfix plugin has been marked by several people as not working in 3.4.2 (as many as say it does work).

I make it a practice to never modify the WordPress core and only use plugins to affect functionality, but you seem certain so I'll investigate further.

comment:31 in reply to: ↑ 30 @SergeyBiryukov3 years ago

Replying to peterjanes:

Please note that the hotfix plugin has been marked by several people as not working in 3.4.2 (as many as say it does work).

If you refer to "3 people say it's broken" on the plugin page, there's not enough details to know what exactly doesn't work for them.

From what I've seen on the support forums so far, Hotfix 0.9 solves the issue with custom fields in 3.4.2. Your report is the first one indicating otherwise, so more details would be great.

comment:33 @peterjanes3 years ago

Aha, 3.4.2's template.php update wasn't propagated by my source control system (another reason why I'm converting to git soon). Works fine now; apologies for the bugspam.

comment:34 @Asif2BD3 years ago

I updated one of my site over WPEngine, instantly got custom field issue, installed Hotfix, did not solved the issue, now dont have the custom field button disappear issue, but Custom field is not saving at all.

I have used the fix-custom-fields-in-wp342 fix too, no solution so far.

comment:35 @NA13 years ago

  • Cc NA1 added

comment:36 @wycks3 years ago

I am surprised this did not get more attention/omgBBQ in support and on the web in general.

I can confirm that Hotfix 0.9 does work with WordPress 3.4.2

comment:37 follow-up: @tar.gz3 years ago

Not sure if this is related, but I notice that in WP 3.5-beta1 [22150] the custom fields are "half broken" - the Ajax is not working, adding or updating a custom field reloads the whole page. Tested in FF16 and chrome 21 (osx).

comment:38 in reply to: ↑ 37 @SergeyBiryukov3 years ago

Replying to tar.gz:

in WP 3.5-beta1 [22150] the custom fields are "half broken" - the Ajax is not working, adding or updating a custom field reloads the whole page.

AJAX is broken due to some changes in #21598. #21852 was an attempt to fix that, but the consensus was to focus on #21152 instead.

comment:39 @tahrirsquare3 years ago

The hotfix plugin does not work any more with Wordpress 3.4.2. It worked fine until I updated PHP to 5.4.7 from 5.3.17. Now, when creating a new custom field it lands in a big pink box with red border, right above the existing custom fields, and in order to create another custom field the post must be updated/saved just like before.

See attached image below.

Version 1, edited 3 years ago by tahrirsquare (previous) (next) (diff)

@tahrirsquare3 years ago

Custom fields bug

comment:40 @tahrirsquare3 years ago

Disregard my comments. I apologize for the false alarm. The error was caused due to wp-config.php had a UTF-8 encoding. Changing to UTF-8 without BOM fixed it.

Last edited 3 years ago by tahrirsquare (previous) (diff)

comment:41 @SergeyBiryukov3 years ago

Updated 21829.34-branch.patch to include the fix for link categories from #22340.

comment:42 @nacin3 years ago

In 22371:

Fix ajax adding of custom fields and link categories. props SergeyBiryukov. for the 3.4 branch. see #21829.

comment:43 @nacin3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

comment:44 @SergeyBiryukov3 years ago

#22391 was marked as a duplicate.

comment:45 follow-up: @PhilipVictor10 months ago

  • Summary changed from Custom Field "Update" button failure to Custom Field error

Hello,
After I made the update from wordpress 3.2.0 to wordpress 4.0 I found a problem with Custom Field it appears as html code ( I mean when I write inside the custom field I have to write as a html not as a normal text)

comment:46 in reply to: ↑ 45 @SergeyBiryukov10 months ago

  • Summary changed from Custom Field error to Custom Field "Update" button failure

Replying to PhilipVictor:

After I made the update from wordpress 3.2.0 to wordpress 4.0 I found a problem with Custom Field

This ticket was closed on a completed milestone, please create a new one.

Note: See TracTickets for help on using tickets.