WordPress.org

Ready to get started?Download WordPress

Forums

WP Customer Reviews
[resolved] reviews show up twice (duplicated) after installing custom fields plug (24 posts)

  1. noise
    Member
    Posted 2 years ago #

    Hi.
    We're trying to use wp-customer-reviews and it's just the ticket.

    However, we needed to add 2 custom fields to the output (using the Advanced Custom Fields plugin).

    The reviews now show up twice, above each custom field.
    It's pretty basic, just a call to the custom fields after "the_content"

    <?php the_content(); ?>
    	<h3>ingredients</h3>
    	<?php the_field('ingredients'); ?>
    	<?php the_field('size'); ?>
         <?php endwhile; else: ?>

    Not sure how to fix it, although I've looked through the plugins code and the only thing I could find related is at line 870:

    /* return normal content if this is not an enabled page, or if this is a post not on single post view */
    if (!$is_active_page) {
    $the_content .= '<div id="wpcr_respond_1">';
    $the_content .= $this->aggregate_footer(); /* check if we need to show something in the footer then */
    $the_content .= '</div>';
    return $original_content . $the_content;
    }

    any ideas how to get it to show up just once?

    Here's a screen shot

    http://wordpress.org/extend/plugins/wp-customer-reviews/

  2. noise
    Member
    Posted 2 years ago #

  3. Interpolat
    Member
    Posted 2 years ago #

    Am also experiencing the same problem.

  4. subtilty
    Member
    Posted 2 years ago #

    I am getting the same but without the custom fields. A brand new install is displaying in two places on one pay. I am only using the shortcode.

  5. Tim0000
    Member
    Posted 2 years ago #

    Use this shortcode:

    [WPCR_INSERT WPCR_SHOW POSTID="ALL" NUM="" SNIPPET="" MORE="" HIDECUSTOM="0" HIDERESPONSE="0"]

  6. noise
    Member
    Posted 2 years ago #

    thanks.

    We're not using the short code but have it automatically added to the bottom of the posts. Any help would be greatly appreciated.

  7. noise
    Member
    Posted 2 years ago #

    bump

  8. ddpweb
    Member
    Posted 2 years ago #

    Great Plugin! But I'm seeing duplicate buttons to the review form - what is also interesting, is that when I add this shortcode to the text widget so I can see the reviews in the sidebar, it duplicates the reviews on the bottom of the page, AND shows the review form button. Weird. Is there a fix for this? It's a basic install.

  9. ddpweb
    Member
    Posted 2 years ago #

    I was able to hide the duplicate by creating my own CSS specific to the page ID.

    I also modified the file: wp-customer-reviews.php / by replacing the <hr /> at the end of each review item with my own CSS <div class="review-sep"></div> - so I could hide it.

    .page-id-14 #page-content .item hr, .page-id-14 #page-content .hreview, div.review-sep {
    	display: none;
    	visibility:hidden;
    	}
  10. jackfitz1
    Member
    Posted 2 years ago #

    I am also having the same problem with review showing duplicate can anyone help me please? Her is a link to the review page. http://myroofexpert.co.uk/testimonials/

  11. billyghawaii
    Member
    Posted 2 years ago #

    I too am getting duplicate reviews, not using custom fields.

    Update: I think I have a clue for the programers. For me the duplicates happen on the single page I set up to hold all the reviews. I have the code entered at the top as so:

    [WPCR_SHOW POSTID="ALL" NUM="" SNIPPET="" MORE="" HIDECUSTOM="0" HIDERESPONSE="0"]

    Which I believe is "standard" However... in the edit mode for that page I had also included a check mark to enter the code on the bottom of the page so that a review could be submitted.

    With that option also includes stored reviews to be displayed, before the submit.

    So the code on the top of the page created the first display of the view and choosing the option to include the submit a review on that same page created the duplicate review just above it.

    Perhaps an option to allow the submit a review but not display the reviews above it is in order? Or turn of the option to submit the review on "reviews page". (not preferred)

    Now I will review the options to see if the fix can be done with the existing parameters.

  12. strick
    Member
    Posted 2 years ago #

    Having the same duplicate problem. Not a coder. I wonder if any support people have read this thread?

  13. Interpolat
    Member
    Posted 2 years ago #

    My suggestion to all that are still seeing duplicate posts is to do the following.

    Designate one page where your reviews will appear, and where users will submit reviews.

    Insert the shortcode [WPCR_INSERT]
    Make sure NO options are checked or filled in, in the WP Customer Reviews tab in the page edit window. Just simply enter the shortcode and publish the page.

    Now, go to your Customer Reviews Plugin settings. (Settings ---> Customer Reviews

    Make sure that under the "Review Page Settings" the option for "Show review form:" is checked. Also fill in your preferred button text.

    Let me know if this helps.

    Josh
    http://www.jmdezigns.com

  14. jackfitz1
    Member
    Posted 2 years ago #

    Hi strick as you can see looking through the threads there does not seem to be any support for this plugin. I have had a question on for 3 weeks and have had no reply as have many others, as far as i can make out you are left to figure it out yourself or hopefully someone else other than support may help you. Im not knocking the plugin because it is still a good one but there are a lot of messing with code and if you are like me and dont know much about code then we are lost.
    I hope support will read this and take note.

  15. Interpolat
    Member
    Posted 2 years ago #

    Have you tried my suggestion above? That's how I resolved the duplicate comments issue.

  16. strick
    Member
    Posted 2 years ago #

    JMDezigns,

    Your solution worked for me. I think the key is in creating a designed page as opposed to a post. When I set up a page as you suggested, it woked fine with no duplication. However, using the code in a post still showed duplication.

    Thanks.

    Jim

  17. Reubz
    Member
    Posted 2 years ago #

    Great Plugin!!
    @ billyghawaii - Chur bro, your thoughts enabled the correct solution.

    If you use the shortcodes on a Page, ensure to check your "WP Customer Review" Options Tab settings under the CONTENT window. Make sure that the option: "Enable WP Customer Reviews for this page" is UNCHECKED. Duplicate information should no longer be produced....Enjoy

  18. bompus
    Member
    Plugin Author

    Posted 2 years ago #

    This is the developer. The last answer seems correct. You shouldn't be using shortcodes AND the "Enable WP Customer Reviews for this page" page option together -- it will duplicate and that is the expected behavior for right now. I will look into the next version and see how difficult it would be to pretend the checkbox is unchecked if a shortcode is detected on the page -- but that could also cause problems.

  19. germanliu
    Member
    Posted 2 years ago #

    Hi, I have the shortcode [WPCR_INSERT] on a widget area and it duplicates the review on the actual post/page. An example can be found here: http://ritzycharters.com/www2/yachts/crystal-clear/

    I have unchecked Enable WP Customer Reviews for this page on that specific post/page and nothing.

    The plugin is great but this is stopping me from using it.
    Any suggestions?

  20. rpattillo
    Member
    Posted 1 year ago #

    I have the same problem with duplicated plugin content when using a short code on a CPT.

    WPCustomerReviews::do_the_content() is called twice when added to a CPT. Since it is being used on a CPT, there is no option to disable WP customer reviews for the page.

    A WPCustomerReviews object is initialized even for pages that do not use it. On line 60, 'do_the_content' is added to the 'the_content' action and blissfully lets do_the_content()/is_active_page() sort out if it should modify the output. That's the source of the first call.

    If the page has the short code, then shortcode_wpcr_insert() is called, which sets $force_active_page to 1 and calls do_the_content. That's the source of the second call.

    By the time do_the_content is called for the action hook, shortcode_wpcr_insert() has already set $force_active_page to 1. So the check that is supposed to safeguard it from not being on pages where it isn't enabled fails.

    A quick hack that worked for me (since I only use the short codes) was to comment out the add_action line in the constructor. It should probably do some check there and only add the action if the plugin is enabled for the page.

  21. wordvaran
    Member
    Posted 1 year ago #

    I only used the shortcode and unchecked the Enable WP Customer Reviews for this page. I dont see 2 revieuw forms. I only see one form but 3 checkboxes???

    How can i solve this issue?

  22. Jenny
    Member
    Posted 1 year ago #

    I also have the same duplication problem.
    I have used this plugin on other sites in the past with no problem so perhaps I should downgrade the plugin and see if that helps.

    Currently if I have [WPCR_INSERT] plus [WPCR_SHOW POSTID="ALL" NUM="" SNIPPET="" MORE="" HIDECUSTOM="0" HIDERESPONSE="0"] on the same page, the doublication appears.

    If I remove [WPCR_INSERT] shortcode from the page/post, then duplication disappears. So it seems that adding both shortcodes to the post or page, is causing this duplication for me.

  23. Jenny
    Member
    Posted 1 year ago #

    ok downgrading does not resolve the issue. perhaps its a plugin conflict then

  24. Jenny
    Member
    Posted 1 year ago #

    Nope, not a plugin conflict either.

    I now deleted all the short code and tried using only the "enable reviews" option on the posts and pages and this works, no duplication.

    So it seems that the shortcode itself is causing the problem for me. However I do need to use the short code as I want to include the review in a tabbed interface on each product page.

    So I urgently need a resolution to this duplication error when using shortcode

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic