Submission from non-logged in users failing,
Support › MB Frontend Submission › Submission from non-logged in users failing,Resolved
- This topic has 9 replies, 2 voices, and was last updated 4 years, 7 months ago by
davidrknowles.
-
AuthorPosts
-
September 18, 2020 at 9:42 PM #21942
davidrknowles
ParticipantHi guys, its been a while.
Just trying to sort out a few issues I have been having of recent.
I noticed that non-logged on users were not able to submit a form anymore.
I have a metabox with 4 fields including email.
The form is sent to a CPT non of the standard PT fields are used, but Title is checked in the post type settings as I have a action (rwmb_frontend_after_process) modifying the post using wp_update_post.This was working fine in the past but recently it seems to fail, if I use the AJAX method I get a return error
TypeError: Cannot read property 'message' of undefined
probably due to the return variable.The wp logs are not showing anything apart form
PHP Warning: chmod(): Operation not permitted in /....../class-wp-filesystem-direct.php on line 173
Not to sure where the problem is, as it works fine for logged on users.
September 18, 2020 at 10:24 PM #21945davidrknowles
ParticipantIgnore the
PHP Warning: chmod()
warning, it was just a server permission error, was hoping it would fix the form submission issue but to no avail.I have tried removing the action
rwmb_frontend_after_process
and also editing the post type settings, and removing reCaptcha and AJAX. without AJAX I get a 404 returned.September 18, 2020 at 10:28 PM #21946Long Nguyen
ModeratorHi David,
Please deactivate all plugins except Meta Box, Meta Box extensions, and switch to the default theme of WordPress (Twenty Twenty) then submitting post again with two case: no Ajax and Ajax.
Let me know how it goes.
September 19, 2020 at 2:20 AM #21951davidrknowles
ParticipantHi Long,
I tried all of what you have suggested and it is as follows.
Everything off apart from meta box and meta box AIO:
with ajax = Fail
without ajax = PassSo I turned everything on again:
with ajax = Fail
without ajax = PassI then tried with without ajax but added in reCaptcha = Fail
So it looks like its to do with the validation of the ajax request or reCaptcha, maybe requiring some kind of user validation.
Hope this helps
September 19, 2020 at 2:36 AM #21952davidrknowles
ParticipantAlso worth adding without both ajax request or reCaptcha it still fails in a different browser like Brave or firefox, it just gives a 404.
September 19, 2020 at 9:06 AM #21954Long Nguyen
ModeratorHi,
I've double-checked on my demo site but not see this issue, you can also check in URLs.
http://metabox.nguyenthanhlong.info/frontend-submit/
http://metabox.nguyenthanhlong.info/frontend-submit-noajax/September 19, 2020 at 10:11 AM #21963davidrknowles
ParticipantThats really weird both those links work fine.
This is my form: https://davidrknowles.com/contact/
September 19, 2020 at 11:26 AM #21968davidrknowles
ParticipantI really dont understand why it's not working, I have updated to PHP 7.4, I have reflushed the server permissions, restarted the server. Now its not submitting with all the plugins off and the default theme without being logged in.
September 19, 2020 at 11:42 AM #21969davidrknowles
ParticipantOk I think I have sorted it, being away from WP for a while has made forget what a hassle caching can be, I turned off VARNISH in my server and it seems to be all work.
The only weird thing now is the Title field is now showing regardless of not having it in the shortcode.
September 19, 2020 at 11:51 AM #21970davidrknowles
ParticipantFixed that too lol turns out I was editing the shortcode in the WP Block and not the beaver builder module.
Seems to be working perfectly now. thanks
-
AuthorPosts
- You must be logged in to reply to this topic.