WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] Incorrect Image Lookup while Hovering (19 posts)

  1. xsreality
    Member
    Posted 11 months ago #

    Hi,

    I had the plugin deactivated for some time and then reactivated it after upgrading to WP 3.6.1. I have configured the stars iconset (1-5). When hovering over the rating, the image gets replaced with missing image icons. Looking at HTML source, Ajax tries to change the image to /wp-content/plugins/wp-postratings/images/stars/rating_1_on.gif. rating_2_on.gif and so on... But the image files present inside the stars folder is of name rating_half.gif, rating_off.gif etc.

    Why is it looking for improper image file? Please help.

    Abhinav

    http://wordpress.org/plugins/wp-postratings/

  2. Lester Chan
    Member
    Plugin Author

    Posted 11 months ago #

    That depends on what type of ratings you use which you have choose in WP-Admin -> Ratings -> Ratings Options -> Ratings Image.

    If you use thumbs up/down ratings, it will use _1 and _2, if you use star ratings, then it will be on, off, etc

  3. xsreality
    Member
    Posted 10 months ago #

    Hi Chester,

    I have chosen stars_crystal and Max Rating is set to 5. I deactivated and activated again. But still didn't work.

    You can check the issue here: http://www.abhiguitar.com/2012/04/28/guitar-chords-pani-da-rang-vicky-donor/

  4. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    I don't see a problem, I just rated and it works fine. See this SS http://imgur.com/DOUJs2U

  5. xsreality
    Member
    Posted 10 months ago #

    Oh I don't understand. Is it something to do with cache? I am using W3 Total Cache. Just re-opened my browser and cleared all cache and tried again. Still the same issue. I opened a completely different post and it worked... but I refreshed it and again it is not working. It looks like this: http://imgur.com/HdCjNsN

    Can you try checking different posts and refreshing. Just hovering over the stars should show up the problem.

  6. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

  7. xsreality
    Member
    Posted 10 months ago #

    Hmm... probably something wrong at my end.

  8. xsreality
    Member
    Posted 10 months ago #

    Hmm... probably something wrong at my end.

  9. Wes
    Member
    Posted 10 months ago #

    Hey xsreality,
    It's definitely not a problem on your end. It happened for me when testing your page too:

    http://screencast.com/t/EzxcIXSPZxKX

    Unfortunately I'm having the same problem on my site after installing w3total cache. Think it has something to do with minify, but haven't yet figured out how to get it to work without entirely disabling minif..?..

    http://www.aprfinder.com/discover-it-credit-card

    Rating doesn't seem to save anymore either.

  10. xsreality
    Member
    Posted 10 months ago #

    Hi Wes,
    Yes, the problem is still not resolved. I checked my ratings data and there have been only 3 ratings in past few days. Usually I get 6-8 ratings everyday on various posts.

    It seems to work intermittently but more often than not it fails so it does seem to be cache issue. Maybe there is some js file that needs to be put in the Minify exception list? Lester, please help..

  11. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    I am getting a problem on xsreality site right now. I believe this is a caching issue. Anywhere to force expire all cache? Maybe for a start you can even disable caching to see if it works.

  12. Wes
    Member
    Posted 10 months ago #

    The only way I can get the stars to work properly on my site is if I disable JS Minify in w3total cache:

    http://screencast.com/t/DUxvR8EHBk

    However, since I don't want to do that I've created a semi-workaround by creating the new star images minify is requesting most often when I hover over them:

    rating_1_on.gif - rating_5_on.gif
    rating_1_off.gif - rating_5_off.gif
    rating_5_half.gif

    It's definitely not ideal, but kinda works.

  13. xsreality
    Member
    Posted 10 months ago #

    I added postratings-js.js file to the Minify js ignore list as shown here: http://imgur.com/l1SAn0s Also, changed the Minify mode from 'Auto' to 'Manual' in W3TC general settings so that it will pick the manual settings.

    Now it seems the ratings are working fine on all posts even after refresh. Try this out Wes and let me know how it goes.

    By the way, this link seems to have a nice W3TC configuration tutorial. I haven't tried it yet... will do it on my local config to see if it works.

  14. Wes
    Member
    Posted 10 months ago #

    Hey XSReality,
    Thanks for the tip, but if you look at your source code minify doesn't seem to minifying any of your .js files now - at least not on the above page. I tried setting mine to manual earlier and it did allow postratings to work, but my site slowed down because minify seemed to stop working on other JS files for me to. I also tried excluded all of the postratings js files like you did with postratings-js.js and that didn't work at all. You probably don't need it in there if you have the js minify settings set to manual - I didn't and it still worked. But like I said, that seemed to stopped all js files from being minified.

    I'll have to check out that link you sent me tomorrow...way past my bed time now..

    Best!

  15. xsreality
    Member
    Posted 10 months ago #

    Yes it seems in manual setting the JS and CSS files need to be added manually. I did that using Help wizard of the plugin and now as per PageSpeed there are only two files which are above-fold: 1 JS and 1 CSS. I haven't added the postratings-js.js file and rating is working fine.

  16. Wes
    Member
    Posted 10 months ago #

    Oh, cool! I'll have to give that a try.

    I wish we could just exclude the the PostRatings JS like I have with other JS files rather than having to go through all of that, but I'll take what I can get I guess. :)

    Thanks, XSreality!

  17. xsreality
    Member
    Posted 10 months ago #

    Ok one final update. I changed the Minify setting from "Default (blocking)" to "Non-blocking using async" and now PageSpeed doesn't complain about any JS file (http://imgur.com/RoOjDw7). There is still 1 CSS file but it is shown as green so not a problem. Score has improved from 81 to 87. PostRatings is working fine.

  18. Wes
    Member
    Posted 10 months ago #

    Got it!

    I was able to get minify to work properly when set to auto by adding the postratings-js.js file to the Never minify the following js files section: exactly like this:

    /wp-content/plugins/wp-postratings/postratings-js.js

    Star ratings are working great now and all of my other .js, css files etc., are still getting minfied automatically.

  19. Wes
    Member
    Posted 10 months ago #

    No my only issue is getting the page cache to clear when this happens so the updated rating displays to the next visitor without having to clear the page cache or waiting for it to expire.

Reply

You must log in to post.

About this Plugin

About this Topic