Closed devont3 closed 3 years ago
Issue-Label Bot is automatically applying the label Type: Bug
to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
@pglewis I believe you were busy with refactoring to React at the moment? I guess the issue above will be fixed once that is done? I'm getting an internal server error when required fields are not filled.
I thought I already had an issue for this but couldn't find it in a search.
This is probably 2 issues to fix:
1) I believe we just die()
with a message if things don't pass validation on the server-side. That obviously won't play well with Gutenberg, which does ajax saves instead of a form submit and full page load. Server-side validation must always be in place since client-side validation can be bypassed, so we need a fix there.
2) We need required validation to take place on the client-side for all fields so we can cancel the save and avoid the server round-trip. This should arrive as part of the big 2.8 work going on right now.
Going to follow up on this in #5484
Describe the bug I've extended the Post Type and added two custom fields: (1) simple custom defined list w/ multi select, and (2) simple custom defined list w/ single select AND default value.
These fields display correctly in the post editor (with red asterisks, and the second custom field defaulted to correct value). However, when I do a test post where I select no value for the first custom field, and leave the second custom field at default, WP allows me to publish - no errors or banners telling otherwise.
To Reproduce Steps to reproduce the behavior: See screenshots below.
Expected behavior If the required custom field has no selection, the user cannot publish without filling in the required fields.
Screenshots Extend Post Type and add custom fields.
Create a new post to test.
Pods Version
Version 2.7.12
WordPress Environment
Debug Information WordPress Version: 5.1.1
PHP Version: 7.0.33-0ubuntu0.16.04.4
MySQL Version: 5.5.5
Server Software: nginx/1.10.3
Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36
Session Save Path: /var/lib/php/sessions
Session Save Path Exists: Yes
Session Save Path Writeable: Yes
Session Max Lifetime: 1440
Opcode Cache:
Apc: No Memcached: No OPcache: Yes Redis: No Object Cache:
APC: No APCu: No Memcache: No Memcached: No Redis: No WPDB Prefix: wpideas
WP Multisite Mode: No
WP Memory Limit: 40M
Current Memory Usage: 6.380M
Current Memory Usage (real): 2.000M
Pods Network-Wide Activated: No
Pods Install Location: /srv/www/ideas/wp-content/plugins/pods/
Pods Tableless Mode Activated: No
Pods Light Mode Activated: No
Currently Active Theme: Twenty Sixteen
Currently Active Plugins:
Authors Widget: 2.4.8 FV Clone Screen Options: 0.3 Jetpack by WordPress.com: 7.1.1 List all posts by Author, nested Categories and Titles: 2.7.6 My Private Site: 2.14.2 Pods - Custom Content Types and Fields: 2.7.12 Search & Filter: 1.2.11