Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#21829 closed defect (bug) (fixed)

Custom Field "Update" button failure

Reported by: baronhigbee's profile BaronHigbee Owned by: baronhigbee's profile 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 12 years ago.
Image of the problem
add-custom-field-bug.png (33.3 KB) - added by sethta 12 years ago.
Image of Add Custom Field "button artifact"
21829.patch (2.0 KB) - added by SergeyBiryukov 12 years ago.
21829.34-branch.patch (2.2 KB) - added by ocean90 12 years ago.
Patch for the 3.4 branch.
fix-custom-fields-in-wp342.php (745 bytes) - added by SergeyBiryukov 12 years ago.
Screen Shot 2012-09-08 at 7.10.00 PM.png (16.8 KB) - added by Amit_k 12 years ago.
update custom field button (mess)
custom-fields-bug.jpg (57.2 KB) - added by tahrirsquare 12 years ago.
Custom fields bug
21829.34-branch.2.patch (3.1 KB) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (54)

@BaronHigbee
12 years ago

Image of the problem

#1 @sethta
12 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.

@sethta
12 years ago

Image of Add Custom Field "button artifact"

#2 @SergeyBiryukov
12 years ago

  • Milestone changed from Awaiting Review to 3.5

Broken in [21205] :(

#3 @SergeyBiryukov
12 years ago

  • Keywords has-patch needs-testing added

#4 @SergeyBiryukov
12 years ago

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

21829.patch fixes that as well.

#5 @BaronHigbee
12 years ago

Attempted the patching but the problems remained

#6 follow-up: @BaronHigbee
12 years ago

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

#7 @garscott
12 years ago

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

#8 @c3mdigital
12 years ago

  • Keywords needs-testing removed

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

#9 in reply to: ↑ 6 @SergeyBiryukov
12 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

#10 @ocean90
12 years ago

  • Priority changed from normal to highest omg bbq

[21717] for the 3.4 branch.

#11 @toscho
12 years ago

  • Cc info@… added

#12 @ocean90
12 years ago

  • Version changed from trunk to 3.4.2

@ocean90
12 years ago

Patch for the 3.4 branch.

#13 follow-up: @nacin
12 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.

#14 @nacin
12 years ago

  • Milestone changed from 3.5 to 3.4.3

#15 in reply to: ↑ 13 @SergeyBiryukov
12 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.

#16 @BaronHigbee
12 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 :)

#18 @nacin
12 years ago

In [21781]:

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

#19 @nacin
12 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.

#20 follow-up: @nacin
12 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_k
12 years ago

update custom field button (mess)

#21 in reply to: ↑ 20 @Asif2BD
12 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?

#22 @nacin
12 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.

#23 @tar.gz
12 years ago

  • Cc code@… added

#24 @fjarrett
12 years ago

  • Cc fjarrett@… added

#25 @meloniq
12 years ago

  • Cc meloniq@… added

#26 @peterjanes
12 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() {

#27 @nacin
12 years ago

#newmeta-submit was added in 3.5.

#28 follow-up: @peterjanes
12 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?

#29 in reply to: ↑ 28 @nacin
12 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

#30 follow-up: @peterjanes
12 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.

#31 in reply to: ↑ 30 @SergeyBiryukov
12 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.

#33 @peterjanes
12 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.

#34 @Asif2BD
12 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.

#35 @NA1
12 years ago

  • Cc NA1 added

#36 @wycks
12 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

#37 follow-up: @tar.gz
12 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).

#38 in reply to: ↑ 37 @SergeyBiryukov
12 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.

#39 @tahrirsquare
12 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.

UPDATE: Disregard my comment. Hotfix works, see my comment below.

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

@tahrirsquare
12 years ago

Custom fields bug

#40 @tahrirsquare
12 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 12 years ago by tahrirsquare (previous) (diff)

#41 @SergeyBiryukov
12 years ago

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

#42 @nacin
12 years ago

In 22371:

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

#43 @nacin
12 years ago

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

#44 @SergeyBiryukov
12 years ago

#22391 was marked as a duplicate.

#45 follow-up: @PhilipVictor
10 years 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)

#46 in reply to: ↑ 45 @SergeyBiryukov
10 years 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.