Notifications
Clear all
Search result for: field value invalid
@wp_user,
Please replace your code with the following one. It should work fine:
function my_wpdiscuz_autocheck_agreebox() {
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#wpdcom .wpd-field-agreement .wpd-field').prop('checked', true);
});
jQuery(document).ready(function(){
jQuery(document).on('click', '.wpd-reply-button', function() {
jQuery('.wpd-form .wpd-field-agreement .wpd-field-group-title .wpd-field').prop('checked', true);
});
});
</script>
<?php
}
add_action('wpdiscuz_comment_form_after', 'my_wpdiscuz_autocheck_agreebox');
Hello,
First of all thank you for this fantastic plugin!
I just installed it over a WooCommerce shop and I am using wpDiscuz for product reviews.
We already have around 200 reviews in WooCommerce which I was hoping to be able to display in the new format. I added the Rating field in the Forms and I can add ratings to new comments, but it does not display the old ratings.
Basically all of our old ratings are not displayed now, only new ones from after installation of your plugin.
In comments there is already a "Rating" field, but wpDiscuz creates a new C ...
... in the future. The following warnings were found on your site:
Missing field "brand"
Missing field "description"
Missing field "image"
Missing field "offers"
Missing field "review"
Is there anything I can do to resolve? Seems to be coming from the article rankings?
Cheers
thanks for the answer @Asti, but my console is getting an error on that part:
if ($wpdz -> options -> general['loadComboVersion'])
Uncaught SyntaxError: Unexpected token '>'. How that works exactly?
Here is my code modified for get the value from API:
const userInfo = getLastUserInfo();
add_filter('wpdiscuz_js_options', function ($jsOption) {
if (userInfo) {
$jsOption['username'] = userInfo.fullName;
$jsOption['uid'] = userInfo.uId;
for (let i = 0; i < userInfo.contactList.length; i++) {
const mail = userInfo.contactList[i];
if (documentCPF.type === 'email') {
$jsOption['usermail'] = mail;
}
}
}
return $jsOption;
});
add_action('wpdiscuz_front_scripts', function () {
$wpdz = wpDiscuz();
$handle = 'wpdiscuz-ajax-js';
if ($wpdz -> options -> general['loadComboVersion']) { //error part
$handle = 'wpdiscuz-combo-js';
}
wp_add_inline_script($handle,
`jQuery(document).ready(function ($) {
if (wpdiscuzAjaxObj.username) {
$("#wpdcom .wc_name").val(wpdiscuzAjaxObj.username);
$("#wpdcom .wc_email").val(wpdiscuzAjaxObj.usermail);
$("#wpdcom .wc_uid").val(wpdiscuzAjaxObj.uid);
Cookies.set("comment_author_" + wpdiscuzAjaxObj.cookiehash, wpdiscuzAjaxObj.username);
Cookies.set("comment_author_email_" + wpdiscuzAjaxObj.cookiehash, wpdiscuzAjaxObj.usermail);
Cookies.set("comment_author_uid_" + wpdiscuzAjaxObj.cookiehash, wpdiscuzAjaxObj.uid);
}
});`
);
});
@danihml,
You can use the js code below. Just change the red-marked part in the code:
add_filter('wpdiscuz_js_options', function($jsOption) {
if (true) {//condition if user logged in other API and user exist
$jsOption['other_api_user_login'] = 'user_login';
$jsOption['other_api_user_email'] = 'user@email.com';
}
return $jsOption;
});
add_action('wpdiscuz_front_scripts', function() {
$wpdz = wpDiscuz();
$handle = 'wpdiscuz-ajax-js';
if ($wpdz->options->general['loadComboVersion']) {
$handle = 'wpdiscuz-combo-js';
}
wp_add_inline_script($handle, 'jQuery(document).ready(function ($) {
if(wpdiscuzAjaxObj.other_api_user_login){
$("#wpdcom .wc_name").val(wpdiscuzAjaxObj.other_api_user_login);
$("#wpdcom .wc_email").val(wpdiscuzAjaxObj.other_api_user_email);
Cookies.set("comment_author_email_" + wpdiscuzAjaxObj.cookiehash, wpdiscuzAjaxObj.other_api_user_email);
Cookies.set("comment_author_" + wpdiscuzAjaxObj.cookiehash, wpdiscuzAjaxObj.other_api_user_login);
}
});');
});
Pay attention to the commented part next to the red-marked value.
Why can't I add the href value of the <a> tag to my "AgreementCheckbox"?
Attachment : image.png
Attachment : image.png
Whenever I add the href value and click save, it disappears when I check it again.
Please check it for me. Thank you.
Hello I want to put a default value to comments, just for comments not replies
and not placeholder
it's a value
can you help me please?
Starting from wpDiscuz 7.0.0 you can use Google reCAPTCHA version 2 "I'm not a robot" antispam protection. In some cases, depended on your server PHP configuration it may not work and return "reCaptcha validation fails. Error code: invalid-json" error.
If you see this error, please navigate to Dashboard > wpDiscuz > Settings > Google reCAPTCHA admin page, find the "Request method" option and change the value of the option to "CurlPost", delete all caches and check again. If it doesn't help select the values one by one to find the request method that will work fine in your case.
Press CTRL+F5 (twice) on the frontend each time before checking.
... as you show in the photo. That exact meta key in the meta key space under additional options with the "Replace old meta key" checked. I also tried it with an underscore before it, in case that's what you meant.
When I check the post meta for the post with ratings, I see:
wpdiscuz_post_rating_wp_review_user_reviews
which is saving a rating entered in the comment field and
wp_review_user_reviews, separately, saves the meta from the wp review plugin stars.
What I'm trying to achieve is that the stars in the WP Discuz comment field ALSO save to wp_review_ ...
@wpdiscuzuser300,
Please follow the steps below:
1. Open the wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Form.php file
2. Find the 494-495 lines
3. Replace the code in the lines with the following one:
$avg = floatval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_AVG . $field, true));$c = intval(get_post_meta($post->ID, wpdFormConst::WPDISCUZ_RATING_SEPARATE_COUNT . $field, true));
Save the changes, delete all kind of caches and check again.
Let usknow if you still see the issue.
Hi,
You can use the CSS code below:
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc{
display: block !important;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value{
display: flex;
justify-content: center;
padding-top: 0 !important;
align-items: center;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrv, #wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc{
font-size: 15px !important;
padding-top: 0px !important;
}
span.wpdrv:after {
content: '/';
}
Insert the code in the "Custom CSS code" textarea, located in the Dashboard > wpDiscuz > Settings > Styles & Colors admin page.
.
Hello,
I was trying to use a CSS code to change the size of the stars in the rating. However, as soon as i hover the section with the cursor, the size switches to normal again.
@media screen and (max-width: 600px){
#wpd-post-rating .wpd-rating-wrap { width: 80%;}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-data {
flex-grow: 1;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-right, #wpd-post-rating .wpd-rating-wrap .wpd-rating-left{
flex-grow: 0;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg {
width: 65px;
height: 65px;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value {
height: 85px;
width: 85px;
display: flex;
align-items: center;
justify-content: center;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrv, #wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc, #wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrt{
font-size: 56px !important;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-title{
font-size: 20px;
}
}
@kh86
Please use the CSS code below:
@media screen and (max-width: 600px){
#wpd-post-rating .wpd-rating-wrap { width: 80%;}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-data {
flex-grow: 1;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-right, #wpd-post-rating .wpd-rating-wrap .wpd-rating-left{
flex-grow: 0;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg {
width: 65px;
height: 65px;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value {
height: 85px;
width: 85px;
display: flex;
align-items: center;
justify-content: center;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrv, #wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc, #wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrt{
font-size: 56px !important;
}
#wpd-post-rating .wpd-rating-wrap .wpd-rating-title{
font-size: 20px;
}
}
Put the code in the "Custom CSS code" textarea, located in the Dashboard > wpDiscuz > Settings > Styles & Colors admin page.
Don't forget to delete the caches before checking.
Facing strange issue.
I have copied live site to staging so in both site code is same. I am using wpengine.
In live site plugin style.css URL generated correctly so all style applied. But in staging plugin style.css wrong URL generated so style not applied.
Live site :
Plugin style URL generated.
<link rel='stylesheet' id='wpdiscuz-frontend-css-css' href='' media='all' />
Staging Site :
Wrong Plugin style URL Generated.
<link rel='stylesheet' id='wpdiscuz-frontend-css-css' href='https://skriftligstage.wpengine.com/style.css?ver=7.6.15' media='all' />
Attachment : Screenshot from 2024-02-09 11-41-45.png
Attachment : Screenshot from 2024-02-09 11-44-14.png
Attachment : staging.png
Attachment : live.png
Attachment : style.css_not_load.png
Attachment : correct_style.css_load&applied.png

