Support » Plugin: Rate my Post - WP Post Rating » Not able to rate

  • Resolved coolph

    (@coolph)


    Not able to rate. Getting below Error in console –

    Uncaught TypeError: attributes[attributeName].split is not a function
        at Function.api [as set] (js.cookie.js:92)
        at HTMLDocument.<anonymous> (wpdiscuz.js:1)
        at i (jquery.min.js:2)
        at Object.fireWith [as resolveWith] (jquery.min.js:2)
        at Function.ready (jquery.min.js:2)
        at HTMLDocument.K (jquery.min.js:2)
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Blaz K.

    (@blazk)

    Hi,

    I’ll have to see the website to debug this ๐Ÿ™‚

    Regards,
    Blaz

    Okay, I have added the shortcode [ratemypost] to below post. Please check and let me know once you’re done with your analysis.

    https://www.techiedelight.com/merge-two-bsts-into-doubly-linked-list-sorted-order/

    Also Tabby Responsive Tabs plugin seems to be broken when I add [ratemypost] to this post. C++ and Java section should be displayed as tabs like in other pages.

    Plugin Author Blaz K.

    (@blazk)

    @coolph,

    it’s a conflict with wpdiscuz plugin. Both plugins use the same library (https://github.com/js-cookie/js-cookie). You can deregister the library from Rate my Post plugin with this snippet:

    
    add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
    
    function my_deregister_javascript() {
      wp_deregister_script( 'rmp-cookie-js' );
    }
    

    Then it should work as the other plugin already loads the library.

    Regards,
    Blaz

    Thanks. Working now.

    Is it possible to use two instance of rating widget on same page say one for post quality and the other one for difficult level?

    Also you might want to update how you read user IP. For users like me who are using cloudflare on their server, your plugin was showing the server IP as the user IP.

    Hereโ€™s code from another plugin WP-PostRatings that correctly returns user IP.

    public function getRealIPAddr() {
    	foreach ( array( 'HTTP_CF_CONNECTING_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key ) {
    			if ( array_key_exists( $key, $_SERVER ) === true ) {
    				foreach ( explode( ',', $_SERVER[$key] ) as $ip ) {
    					$ip = trim( $ip );
    					if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) {
    						return esc_attr( $ip );
    					}
    				}
    			}
    		}
    }
    Plugin Author Blaz K.

    (@blazk)

    @coolph, two instances of rating widget are at the moment unfortunately not possible on a single web page. The plugin will be redesigned to allow this in version 3 which I’m planning to release in the fall.

    Thanks for reporting the issue and providing me with the fix. Will do a small update soon.

    Regards,
    Blaz

    Thanks.
    Please consider adding title attribute to your li elements to display the hover text as a tooltip text.

    Also it would be nice if you can provide option to change the star color on mouseover event as well in Style – Rating Widget.

    Plugin Author Blaz K.

    (@blazk)

    Title attribute was actually there in the earlier versions but removed after “Show star hover texts” feature was implemented.

    That is possible ๐Ÿ™‚ Check “Hover Color:” in the customization.

    Blaz

    ravi002

    (@ravi002)

    Not working please check my site acchibaat.com

    • This reply was modified 1 month ago by  ravi002.
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.