Support » Plugin: Five Star Restaurant Reviews » Show More button has no event?

  • Resolved Harm10

    (@harm10)


    I use shortcode with limit option resulting in the Show More button. But clicking this button does not get me to a next page. It looks like no event is attached to it?
    Can you please investigate?

Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi Harm,

    Would you be able to please share the URL of a page on which you have this implemented, so I can see/test this on your site?

    Thread Starter Harm10

    (@harm10)

    No sorry (again). The live site does not have the latest version yet (see other report).
    And if this problem is not cleared I will raise the limit to such values that this button is not shown (as it is not working at the moment).
    But what you can do is tell me whether it should trigger an event or should just hold an url when clicked?

    BTW If I use limit on the old version (2.0.5) I do not get a Show More button at all?
    That is viewable on the live site but maybe that is irrelevant for the problem above?

    Plugin Support jaysupport

    (@jaysupport)

    Since I don’t know your exact full setup or how to recreate the issue on my end, it’s going to be hard to troubleshoot without seeing it in action. If you have even some kind of development environment with it implemented, that would help. If it’s just that you don’t want to share that URL, you can contact us via our support center at https://www.fivestarplugins.com/support-center/

    Otherwise, I’ll need more info. What is the exact shortcode you are using? Do you have some kind of function set up using the new filter we implemented for you? Are there any errors in the console?

    Thread Starter Harm10

    (@harm10)

    There are no errors in the log and only one about an inaccessible font which I doubt has anything to do with your plug-in.
    I use a shortcode like this on a category with 3 reviews:
    [good-reviews category='testreviews' excerpt=1 random=0 limit=2 ]
    I am willing to open up the test site for a short time but I would rather not paste the full URL here (as I cannot remove it after a while).
    I will investigate whether I can create a tiny url that I can remove later and report back here.
    You do not answer my question: should the click be a jquery event (so I can look in the page source whether that event has been set) or just an url to start when clicked?

    Plugin Support jaysupport

    (@jaysupport)

    I don’t understand why you are trying to/insist on doing it that way. As previously described, that functionality has been updated. All you need to do now is just set the “Reviews per Page” option (in the Basic area of the Settings page) to the number of reviews you want per page. I understand the documentation needs to be updated, that’s clear, but there’s no need to make it harder on yourself just because something is written in the documentation. If you want to limit the number of reviews per page, you need to use the setting now, not that shortcode attribute.

    Thread Starter Harm10

    (@harm10)

    I am maybe mistaken but I do not remember reading a description that you shouldn’t use limit anymore?
    I looked at the Settings and can only find a general setting. So that will be valid for all Review Categories? If so then you loose functionality as you cannot set it differently per Category.
    Anyway, I changed the shortcode and set the general limit to 2 to see no difference at all. Nothing happens when I click the Show More button.

    I now found in my webinspector that an event is attached to it pointing to pagination.js.
    I put some alerts in it and the post function does not have success as the callback function is not called.

    $.post(ajaxurl, data, function(response) {
    	if (response.success) {

    ajaxurl = myurl/wp-admin/admin-ajax.php
    data = next_page=2&action=grfwp_ajax_load_reviews
    I am not sure what the best way is to get to the error (the console displays nothing)

    Thread Starter Harm10

    (@harm10)

    Was my last reply already viewed? I would like to know how I can assist you in finding the error that the event throws?

    Plugin Support jaysupport

    (@jaysupport)

    Hi Harm,

    The hard part is just that we can’t recreate your issue or view it in action on your site, and the Show More button is 100% working in the current version of the plugin.

    Based on what you’ve mentioned, what is likely happening is that the AJAX is not responding correctly, as you said that the success condition on the callback function never executes.

    Perhaps you can enable debug/error logging to file, then go to your site and click the Show More button, and then share the log with us. There should hopefully be some error or warning or notice in there that can give some indication of the issue on your end.

    Also, you can check the RAW response of the AJAX. For example, in Firefox, you would go here to check it:

    Thread Starter Harm10

    (@harm10)

    I have limited time at the moment but I will look at your suggestions and report back.

    Thread Starter Harm10

    (@harm10)

    The raw response of AJAX is:

    {
    	"data": {
    		"output": "\n\t<div  class=\"gr-review gr-item-no-image gr-review-has-rating gr-review-display-numbers\" itemscope itemtype=\"http://schema.org/Review\">\n\t\t\t<div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/\">\n\t\t<meta itemprop=\"name\" content=\"\">\n\t\t<meta itemprop=\"description\" content=\"\">\n\t\t<meta itemprop=\"url\" content=\"\">\n\t</div>\n\t\n\t\t<div class=\"gr-content\">\n\n\t\t\t\n\t\t\t\n\t\t\t\t<div class=\"gr-review-rating gr-rating-numbers\" itemprop=\"reviewRating\" itemscope itemtype=\"http://schema.org/Rating\">\n\t\t\t\t\t<meta itemprop=\"worstRating\" content=\"1\">\n\n\t\t\t\t\t\t\t\t\t\t<span itemprop=\"ratingValue\">8</span> /\n\t\t\t\t\t<span itemprop=\"bestRating\">10</span>\n\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\n\t\t\t<div class=\"gr-author\" itemprop=\"author\" itemscope itemtype=\"http://schema.org/Person\">\n\t\t\t\t<div class=\"gr-author-text\">\n\t\t\t\t\t<span class=\"gr-author-icon\"></span>\n\t\t\t\t\t<span class=\"gr-author-name\" itemprop=\"name\">Cijfervoorbeeld</span>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"grfwp-clear\"></div>\n\t\t\t\t\t\t<span class=\"gr-organization-icon\"></span>\n\t\t\t\t\t\t<div class=\"gr-author-affiliation\" itemprop=\"affiliation\" itemscope itemtype=\"http://schema.org/Organization\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"gr-author-url\" itemprop=\"url\" href=\"http://remark-webdesign.nl/wpbase/\">\n\t\t\t\t\t\t\t\t<span itemprop=\"name\">Remark Webdesign</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"grfwp-clear\"></div>\n\t\t\t\t\t\t<span class=\"gr-review-date-icon\"></span>\n\t\t\t\t\t\t<span class=\"gr-review-date\" itemprop=\"datePublished\">6-4-2017</span>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div> <!-- gr-author -->\n\n\t\t\t<div class=\"gr-review-body\" itemprop=\"reviewBody\">\n\t\t\t<p>En dit eentje met cijfers.</p>\n\t\t\t</div>\n\n\t\t\t<div class=\"gr-custom-fields\">\n\t\t\t\t\t\t\t</div> <!-- gr-custom-fields -->\n\n\t\t\t\t\t\t\t\t<a class=\"gr-review-url\" itemprop=\"url\" href=\"http://www.peter-varg.be/sitetest/de-jaguarkrijger/\">\n\t\t\t\t\t\tLees meer\t\t\t\t\t</a>\n\t\t\t\t\n\t\t</div>\n\n\t</div> <!-- main container for each review -->\n\n\t\n\t<div  class=\"gr-review gr-item-no-image \" itemscope itemtype=\"http://schema.org/Review\">\n\t\t\t<div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/\">\n\t\t<meta itemprop=\"name\" content=\"\">\n\t\t<meta itemprop=\"description\" content=\"\">\n\t\t<meta itemprop=\"url\" content=\"\">\n\t</div>\n\t\n\t\t<div class=\"gr-content\">\n\n\t\t\t\n\t\t\t\n\t\t\t<div class=\"gr-author\" itemprop=\"author\" itemscope itemtype=\"http://schema.org/Person\">\n\t\t\t\t<div class=\"gr-author-text\">\n\t\t\t\t\t<span class=\"gr-author-icon\"></span>\n\t\t\t\t\t<span class=\"gr-author-name\" itemprop=\"name\">Anna Mattaar</span>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"grfwp-clear\"></div>\n\t\t\t\t\t\t<span class=\"gr-organization-icon\"></span>\n\t\t\t\t\t\t<div class=\"gr-author-affiliation\" itemprop=\"affiliation\" itemscope itemtype=\"http://schema.org/Organization\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"gr-author-url\" itemprop=\"url\" href=\"http://annamattaar.nl/\">\n\t\t\t\t\t\t\t\t<span itemprop=\"name\">Site</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"grfwp-clear\"></div>\n\t\t\t\t\t\t<span class=\"gr-review-date-icon\"></span>\n\t\t\t\t\t\t<span class=\"gr-review-date\" itemprop=\"datePublished\">April 2017</span>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div> <!-- gr-author -->\n\n\t\t\t<div class=\"gr-review-body\" itemprop=\"reviewBody\">\n\t\t\t<p>Wat een intrigerend verhaal in een originele setting! Het contrast tussen de moderne elementen en de magie en het bovennatuurlijke werkt erg goed. Het vaak wisselende perspectief had verwarrend kunnen werken, maar er is steeds zo sterk vanuit de waarneming en ideeën van het betreffende personage geschreven, dat altijd duidelijk is door wiens ogen we kijken. Bovendien is het leuk om op die manier ook af en toe het perspectief van een god of demon mee te krijgen. </p>\n\t\t\t</div>\n\n\t\t\t<div class=\"gr-custom-fields\">\n\t\t\t\t\t\t\t</div> <!-- gr-custom-fields -->\n\n\t\t\t\n\t\t</div>\n\n\t</div> <!-- main container for each review -->\n\n\t",
    		"more_pages": true
    	}
    }

    which tells me nothing as it looks good to me.

    But in the log I can see interesting errors:

    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: schema in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 604
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: name in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 605
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: description in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 606
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: url in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 607

    Does this tell you something?

    `

    Thread Starter Harm10

    (@harm10)

    I noticed my previous reply is under moderation (I do not know why).
    The notices that I posted are still in the log but I can see a response now after clicking the button! New reviews are shown below the previously displayed. This was not there before.

    I will await your response first (assuming the moderator will allow my previous reply).

    Thread Starter Harm10

    (@harm10)

    Besides the PHP notices in the log I also noticed that using ECHO breaks the AJAX action. Is this normal? As soon as I put in some echo statements to see what’s in the settings the click action fails.

    I repeat the PHP notices:

    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: schema in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 604
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: name in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 605
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: description in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 606
    [27-Dec-2020 15:29:15 UTC] PHP Notice:  Undefined index: url in /myurl/wp-content/plugins/good-reviews-wp/includes/template-functions.php on line 607
    
    Thread Starter Harm10

    (@harm10)

    Can I please get a response?

    Plugin Support jaysupport

    (@jaysupport)

    Hi Harm,

    Sorry for the delay. I was off for the holidays. At this point, the only way we’re going to be able to help you further is to be able to see your site. You’re the only person to report any kind of issue with this plugin in the last two months, and you’ve created seven different threads. No matter what we suggest, it doesn’t seem to help or you’re not able to implement it. With that in mind, we can’t keep working in the dark any more. We’ve given suggestions, recommendations and workarounds for everything you’ve mentioned and you seem to be having more trouble now than when you started. Something doesn’t add up. There has to be something unique to the way you’re setting this up or trying to use it that just isn’t working. If you can clone your site over to somewhere where we can actually view it, then perhaps we can get a better overview of everything you’re trying to say and hopefully start taking some steps that actually help.

    • This reply was modified 1 month, 3 weeks ago by jaysupport.
    Thread Starter Harm10

    (@harm10)

    Every one should have some holidays especially in these weird times…… 🙂

    I can understand your problem of not seeing it live. I think I even offered to give you some access to the test site but I will not post those credentials here. Perhaps I can sent them somewhere? You must understand that I am not implementing a plug-in with problems on my site for every one to see. That is the whole idea behind having a closed test site.

    But the button click problem is gone, that was due to the echoing I did apparently.
    So I guess for this report only the notices remain?
    For the result of the click I created a separate problem as it seems to revolve on the incorrect values in the controller array. I didn’t want to clutter this report for that as it seemed something else to me. That was not what I was supposed to do?

Viewing 15 replies - 1 through 15 (of 32 total)
  • You must be logged in to reply to this topic.