The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
why i have this Som...
 
Share:
Notifications
Clear all

[Solved] why i have this Some of field value is invalid

7 Posts
2 Users
2 Reactions
2,345 Views
Posts: 7
Topic starter
(@highlander926)
Active Member
Joined: 4 years ago

Hi

I tried to install and test wpdiscuz on my website and everything was fine

but today I see this problem that logged in members can not send a comment

it is after I installed Digits OTP mobile SMS login plugin

cause I want my customers to register and log in using OTP SMS 

for guest users everything is fine but after login, it shows Some of field value is invalid on comment submit

and no errors in the console

but my theme default comment is working fine and wpdiscuz for guest users is working fine too

the problem is only with logged in members

can you please help me with this? 

 

I think the problem is that users have not any email on their profile and sign up just by mobile number

cause admin and another test user with email on the profile is able to post a comment after login

 

thank you

Topic Tags
6 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

@highlander926,

Please edit the "Email" filed and set not-required using the according option, then delete all caches and check again. 

More info here: https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-builder/#comment_form_fields

Posts: 7
Topic starter
(@highlander926)
Active Member
Joined: 4 years ago

thank you for this guide

but I have the same error after doing your settings

I tried to disable ReCaptcha and set not required for email and name field

and try in cache disabled mode

but same error still exists

 

 

4 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@highlander926,

You should find some way to insert random email addresses for registered users, otherwise wpDiscuz will not work. Please note wpDiscuz gets the email address from WordPress wp_users table. As far as in your case the filed's value (email) is missing you see that error. 

(@highlander926)
Joined: 4 years ago

Active Member
Posts: 7

@asti  TnX for help, I am not a technical person to solve this by code

nowadays many sites are switching to SMS and OTP login/registration

so can you please help me with generating random email for all users?any script or code guide?

and fix the problem with OTP sites in your next releases if possible because we love to use your plugin

 

thank you

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@highlander926,

Please try this code. Put the code in your current active WordPress theme functions.php file. 

add_action("user_register", function ($user_id) {
$user = get_userdata($user_id);
if (empty($user->data->user_email)) {
$args = array(
"ID" => $user->id,
"user_email" => uniqid() . "@example.com",
);
wp_update_user( $args );
}
});

How to Easily Add Custom Code in WordPress (without Breaking Your Site).

The code above will work only for the new users. For old users you should edit the users and add some random email address. 

(@highlander926)
Joined: 4 years ago

Active Member
Posts: 7

@asti that work, tnx

Share: