JS errors since 1.0.0.8.1

Front Support Plugins Support WP Reviews Plugin JS errors since 1.0.0.8.1

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Hesham 4 years ago.

  • Author
    Posts
  • #2159

    Anchor Wave
    Participant

    I’m getting a few js errors since updating, mainly with flexslider. Looks like flexslider is missing the .js for the file name.

    These are the errors in the console

    GET http://mysite.dev/wp-content/plugins/wp-reviews/js/jquery.flexslider-min?ver=2.1 404 (Not Found) rainbow-collective:357

    GET http://thesistest.newmediabloggers.com/wp-content/plugins/simple-slider-ssp/views/ssp_skins/default/lib/jquery.flexslider-min.js?ver=0.7 404 (Not Found) rainbow-collective:357

    Uncaught TypeError: Object [object Object] has no method ‘flexslider’

    Also get this error after submitting a user review
    Refused to execute script from ‘https://raw.github.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js?ver=3.4.1’ because its MIME type (‘text/plain’) is not executable, and strict MIME type checking is enabled.

  • #2160

    Anchor Wave
    Participant

    line 14 of inc/slider.php was missing the .js

    should be

    wp_register_script( ‘wpar-flexslider-js’, $wpreviews_plugin_url.’js/jquery.flexslider-min.js’, array(‘jquery’), ‘2.1’, true);

    It’s also loading in flexslider twice, once from the wp-reviews plugin and once from here
    http://thesistest.newmediabloggers.com/wp-content/plugins/simple-slider-ssp/views/ssp_skins/default/lib/jquery.flexslider-min.js?ver=0.7

    which is added on line 102 of slider.php
    <script type=’text/javascript’ src=’http://thesistest.newmediabloggers.com/wp-content/plugins/simple-slider-ssp/views/ssp_skins/default/lib/jquery.flexslider-min.js?ver=0.7′></script>

  • #2164

    Anchor Wave
    Participant

    Also in /inc/user-rating/user-rating-functions.php on line 211

    $(function() {
        <?php foreach($myarray as $key => $element){
        ...
    });

    causes an error “Uncaught TypeError: Property ‘$’ of object [object Object] is not a function”

    can be changed to..

    (function ($) {
        <?php foreach($myarray as $key => $element){
        ...
    }(jQuery));

    to pass the jQuery object so $ refers to jquery

  • #2212

    Hesham
    Keymaster

    Thanks for the great feedback, I’ve made a few changes and updated the plugin.

The forum ‘WP Reviews Plugin’ is closed to new topics and replies.