Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#44530 new defect (bug)

Post or page custom fields give wrong error message when enter value only.

Reported by: harsh175's profile harsh175 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-screenshots has-patch
Focuses: administration Cc:

Description

When I enter custom field's value without field name on the page and click on "Add Custom Field" button, The custom field gives the wrong error message "Please provide a custom field value".

Normally, Message should "Please provide a custom field name." Because I entered only custom field value not a custom field name.

I have attached the screenshot to get the better idea about the issue.

Attachments (3)

Edit Page ‹ wordpress — WordPress.png (30.5 KB) - added by harsh175 6 years ago.
1st screenshot
Edit Page ‹ wordpress — WordPress (1).png (33.1 KB) - added by harsh175 6 years ago.
2nd screenshot
44530.diff (650 bytes) - added by Kubitomakita 6 years ago.

Download all attachments as: .zip

Change History (6)

@Kubitomakita
6 years ago

#1 @swissspidy
6 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added; ui accessibility javascript removed
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from major to normal
  • Version trunk deleted

Regarding 44530.diff:

empty() already does an isset() check, so there's no need for both.

Perhaps it's better to use au isset( $_POST['metakeyinput'] ) && '' === $_POST['metakeyinput'] ) check.

#2 @desrosj
6 years ago

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