Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Incorrect handling of warnings for empty required WYSIWYG fields #5360
Describe the bug
On edit screen meta box with multiple required fields (including WYSIWYG), when neglecting to enter information into required custom fields, some warnings are displayed directly in the meta box next to the field name, highlighted in red, with text above reminding the user that “[Field name] is required.”
However, after neglecting to enter information into a required WYSIWYG field, no warning is shown. After clicking Update, an empty screen with the text “[Field name] is empty” with clickable "Back” text is displayed.
After clicking on the “Back” link, the user is returned to the form, but all of the fields are empty.
Why does the WYSIWYG field type behave differently than the other fields? Why are the fields emptied?
Pods version 2.7.12
WordPress Version: 5.1.1
PHP Version: 7.2.17
MySQL Version: 5.6.36
Server Software: Apache/2.4.39 (Unix) mod_hive/6.27 OpenSSL/1.0.1e-fips mod_fastcgi/2.4.6
Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Session Save Path: /tmp
Session Save Path Exists: Yes
Session Save Path Writeable: Yes
Session Max Lifetime: 1440
WPDB Prefix: mcht_
WP Multisite Mode: No
WP Memory Limit: 40M
Current Memory Usage: 34.660M
Current Memory Usage (real): 36.000M
Pods Network-Wide Activated: No
Pods Install Location: /[snip]/public_html/mcht/wp-content/plugins/pods/
Pods Tableless Mode Activated: No
Pods Light Mode Activated: No
Currently Active Theme: MCHT - Beaver Builder theme
Pods Package Export (helpful!)
Included as attachment
Hey, I'm having a similar issue where we have quite a long form on the front end that populates the fields in Pods custom post type and when the user submits without a required field filled in it goes back to the form and all the fields are blank requiring the user to fill it in again. Any luck with this one Jay?
I've made a discovery but my lack of knowledge is a hindrance but perhaps it could be of use to you, When I try to submit the front end form from an admin account it refuses to submit and prompts the user that a required field is missing. The fields are still populated. Any other account type and I get the previously mentioned problem. I've promoted various test accounts to admin and on all admin accounts it work as I would like them (ie the page doesn't reload and the user just needs to fill in the missing fields). I'm currently editing the user roles to see if there are any permissions I could give to fix this as I don't want all our users with admin privileges for obvious reasons, will report back if I find anything.
Hey, I've solved this problem for me, I don't know if this is of any use to you but I have a plug in called User Role Editor by Vladimir Garagulya, I went into this and edited the user's roles to grant permission for edit_posts (there's one that's edit_postss, its not this one). If you check that box and save it may work. Worked for me, thought I would share, if you see my previous comment it will show how I came to this. Hope it works for you!
Hi, SamWandi. I checked this, and even I, as an administrator, having granted myself all permissions including edit_posts, continue to have the same problem. An empty WYSIWYG field doesn't give an error within the edit screen, but throws an error on the next screen. "Back" returns to an edit screen with no data.
This is a continuing and challenging bug, as it affects all of our authors who are creating custom posts with Pods-created custom fields.