• Resolved liquidclicks

    (@liquidclicks)


    It seems that only Admins and Editors are allowed to rate. I don’t see a setting in the plugin to change this. If someone other than an Admin or Editor tries to rate, the submission “busy” circle just spins. In the console, this error is generated:

    Uncaught SyntaxError: Unexpected token O in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.n.parseJSON (jquery.js?ver=1.12.4:4)
    at Function.a.parseJSON (jquery-migrate.min.js?ver=1.4.1:2)
    at r (frontend-min.js?ver=4.2.6:1)
    at Object.success (frontend-min.js?ver=4.2.6:1)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)

    Any idea why this would happen?

    • This topic was modified 7 years, 8 months ago by liquidclicks.
Viewing 10 replies - 1 through 10 (of 10 total)
  • I am having the same issue. Whenever any non-authenticated user tries to add a rating they get a 404 Not Found error calling the wp-admin/admin-ajax.php file.

    Chrome console error:

    POST https://docmgt.com/wp-admin/admin-ajax.php 404 (Not Found)
    send @ jquery.js?ver=1.12.4:4
    ajax @ jquery.js?ver=1.12.4:4
    n.(anonymous function) @ jquery.js?ver=1.12.4:4
    (anonymous) @ frontend-min.js?ver=4.2.6:1
    dispatch @ jquery.js?ver=1.12.4:3
    r.handle @ jquery.js?ver=1.12.4:3

    Plugin Author dpowney

    (@dpowney)

    Hi there,

    Thanks for reporting this issue. I am unable to reproduce this locally so can I please have more information on your setup? For example, are you using WPML? Are your rating items set as required? Do you have any caching plugins installed?

    Thanks,
    Daniel

    Plugin Author dpowney

    (@dpowney)

    Hi there,

    Thanks for reporting this issue. I am unable to reproduce this locally so can I please have more information on your setup? For example, are you using WPML? Are your rating items set as required? Do you have any caching plugins installed?

    Thanks,
    Daniel

    Plugin Author dpowney

    (@dpowney)

    And did this functionality work for you in the past (i.e. been introduced by a recent plugin version)?

    Thread Starter liquidclicks

    (@liquidclicks)

    I’m not using WPML. No caching plugins. I’m actually running very few plugins. Rating items were not set to required. I’ve changed them to required and I’m still getting the error.

    I’m running WP 4.7.3 with the Premium Press Responsive Directory Theme. The ratings are on the business info page of each listing.

    I will be happy to send you the link, WP login info, FTP, and anything else you might need if you’d like to take a look.

    Edited to add: This is the first time I’ve installed the MR plugin, so it’s not as if it was working and then stopped working. Thanks.

    • This reply was modified 7 years, 8 months ago by liquidclicks.

    I have been using the plugin for quite some time and I had not noticed this issue before. WP was recently updated but not sure 100% if that was the time the ratings stopped working. Since it only fails for non-auth users I did not notice until someone reported it to me.

    Info
    —————
    WordPress version 4.7.3
    Using DIVI theme
    Multi Rating version 4.2.6
    No WPML
    No caching plug-ins

    Recent Changes
    —————
    Recently updated to WP 4.7.3
    Recently added AMP plug-in version 0.4.2

    Hopefully you can narrow down the cause so our users can rate our posts again. Until then I am disabling the plug-in to avoid any confusion.

    Thanks

    Plugin Author dpowney

    (@dpowney)

    Hi @liquidclicks,

    Can you please contact me at multiratingpro.com so I can work with you via e-mail to investigate this issue?

    Thanks,
    Daniel

    Thread Starter liquidclicks

    (@liquidclicks)

    Thank you. I’ve just submitted the form on your site.

    Plugin Author dpowney

    (@dpowney)

    Hi @liquidclicks,

    It appears the admin-ajax interface is being blocked which I have seen before with PremiumPress. See here for history.

    @bvossler – this might be a similar issue with the Divi theme as well.

    Thanks,
    Daniel

    Thread Starter liquidclicks

    (@liquidclicks)

    Seems to be working now. It is indeed an issue with the theme and not the plugin.

    For anyone using a PremiumPress theme, adding this line to DT/framework/class/class_admin.php:
    if(isset($_GET['action']) || isset( $_POST['action'] ) ){ return; }

    just above this line:
    if (strpos(strtolower($_SERVER['REQUEST_URI']), '/wp-admin') !== false && $userdata->ID) {

    worked for me.

    Thanks so much Daniel!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Only Admins & Editors Can Rate’ is closed to new replies.