Tagged: x
-
AuthorPosts
-
December 9, 2016 at 12:29 pm #1287630
TheUnumParticipantHey I have a website that has an insane amount of errors in the comments. They’re each showing as reviews on googles structured data site.
December 9, 2016 at 12:30 pm #1287631
TheUnumParticipantThis reply has been marked as private.December 9, 2016 at 6:42 pm #1287894
TheUnumParticipantJust bumping thread in case it’s gotten lost in the chaos.
December 9, 2016 at 7:24 pm #1288007
Rue NelModeratorHello There,
Thanks for writing in! Just for future topics, self responding or bumping your post pushes it back in our Queue system so it takes longer to respond to.
The issue is a known bug in the Integrity stack. To resolve this issue,
if ( ! function_exists( 'x_integrity_comment' ) ) : function x_integrity_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : // 1 case 'trackback' : // 1 ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <p><?php _e( 'Pingback:', '__x__' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', '__x__' ), '<span class="edit-link">', '</span>' ); ?></p> <?php break; default : // 2 GLOBAL $post; if ( X_WOOCOMMERCE_IS_ACTIVE ) : $rating = esc_attr( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); endif; $avatar_variation = ( x_is_product() ) ? ' x-img-thumbnail' : ''; ?> <li id="li-comment-<?php comment_ID(); ?>" itemprop="review" itemscope itemtype="http://schema.org/Review" <?php comment_class(); ?>> <?php printf( '<div class="x-comment-img">%1$s %2$s</div>', '<span class="avatar-wrap cf' . $avatar_variation . '">' . get_avatar( $comment, 120 ) . '</span>', ( $comment->user_id === $post->post_author ) ? '<span class="bypostauthor">' . __( 'Post<br>Author', '__x__' ) . '</span>' : '' ); ?> <article id="comment-<?php comment_ID(); ?>" class="comment"> <header class="x-comment-header"> <?php printf( '<cite class="x-comment-author" itemprop="author">%1$s</cite>', get_comment_author_link() ); printf( '<div><a href="%1$s" class="x-comment-time"><time itemprop="datePublished" datetime="%2$s">%3$s</time></a></div>', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( __( '%1$s at %2$s', '__x__' ), get_comment_date(), get_comment_time() ) ); edit_comment_link( __( '<i class="x-icon-edit" data-x-icon=""></i> Edit', '__x__' ) ); ?> <?php if ( x_is_product() && get_option('woocommerce_enable_review_rating') == 'yes' ) : ?> <div class="star-rating-container"> <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo sprintf( __( 'Rated %d out of 5', '__x__' ), $rating ) ?>"> <span style="width:<?php echo ( intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ) / 5 ) * 100; ?>%"><strong itemprop="ratingValue"><?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); ?></strong> <?php _e( 'out of 5', '__x__' ); ?></span> </div> </div> <?php endif; ?> </header> <?php if ( '0' == $comment->comment_approved ) : ?> <p class="x-comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', '__x__' ); ?></p> <?php endif; ?> <section class="x-comment-content" itemprop="description"> <?php comment_text(); ?> </section> <?php if ( ! x_is_product() ) : ?> <div class="x-reply"> <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span class="comment-reply-link-after"><i class="x-icon-reply" data-x-icon=""></i></span>', '__x__' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div> <?php endif; ?> </article> <?php break; endswitch; } endif;Please copy the raw code from here (http://pastebin.com/ZqLU7Yws) to preserve the Unicode HTML entities or the data-x-icon
Hope this helps. Please let us know how it goes. values.
December 10, 2016 at 3:10 am #1288202
TheUnumParticipantHey Rue Nel,
That did resolve some of the errors, but I’m still getting The review has no reviewed item specified. Is there a way to change the review property to something else?
December 10, 2016 at 3:11 am #1288203
TheUnumParticipantThis reply has been marked as private.December 10, 2016 at 4:07 am #1288220
Rue NelModeratorHello There,
Thanks for updating in! This issue needs you to have a 3rd party plugin. WooCommerce Product Reviews Pro will allow you to extend the core WooCommerce product reviews functionality. It adds several new functions to product reviews, and can also enable different “contribution” types from customers, such as comments, questions, photos, and videos.
For more details about this plugin, please check it here: https://docs.woocommerce.com/document/woocommerce-product-reviews-pro/#section-17
December 10, 2016 at 11:43 am #1288407
TheUnumParticipantHey Rue Nel,
So there’s no way I can just change my comments to basic wordpress comments without purchasing an $80 plugin? My site doesn’t even have woocommerce installed, so I don’t understand why each comment has this review property.
December 10, 2016 at 4:26 pm #1288562
RadModeratorHi there,
In that case, remove this line from the above code.
itemprop="review" itemscope itemtype="http://schema.org/Review"It’s the attribute that declares that a comment is a review.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1287630 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
