• After upgrading wordpress to latest version, it sopped working and start giving this error in console

    Uncaught TypeError: jQuery.cookie is not a function
        at set_get_lgv_cookie (grid_view.js:90)
        at br_lgv_style_set (grid_view.js:55)
        at HTMLDocument.<anonymous> ((index):300)
        at j (jquery.min.js:2)
        at Object.fireWith [as resolveWith] (jquery.min.js:2)
        at Function.ready (jquery.min.js:2)
        at HTMLDocument.J (jquery.min.js:2)

    This error is in “grid_view.js” file. What should I do to solve this error?

    • This topic was modified 7 years, 11 months ago by rish30990.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hi,

    Please try to replace in plugin main file () this line
    wp_enqueue_script( 'berocket_lgv_grid_list', plugins_url( 'js/grid_view.js', __FILE__ ), array( 'jquery' ), BeRocket_List_Grid_version );
    to thi line
    wp_enqueue_script( 'berocket_lgv_grid_list', plugins_url( 'js/grid_view.js', __FILE__ ), array( 'jquery', 'berocket_jquery_cookie' ), BeRocket_List_Grid_version );

    We will add this fix in next plugin release.

    Regards,
    Oleg

    Thread Starter rish30990

    (@rish30990)

    Hi Oleg Balashkevich,

    Thanks for reply, I was also searching for solution even before and after posting here and found one, here it is..

    I just add below script in my header.php file after wp_head() function (it wasn’t working when I used to add before wp_head()) and issue resolved.

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

    I didn’t try to edit plugins files because client make all plugins up to date so any changes in plugin will be removed soon when client will do update. That’s why I added solution/script in my theme file. But I will look forward for your plugin update. After plugin update I will do remove script from my header.php file because I don’t want to add any script after wp_head().

    Plugin Author RazyRx

    (@razyrx)

    Hi,

    Please try to change file, in next update we will add same changes, but this can doesn’t help you. We need to know is this help to solve your problem.

    Regards,
    Oleg

    Thread Starter rish30990

    (@rish30990)

    Hi Oleg,

    Now I tried your given solution also after seeing your reply. And it didn’t work, problem remains same after applying your solution.

    The console error that I did show you, in that error the key line was “jQuery.cookie is not a function”. It means this issue is related to jquery cookie. That’s why I did add “jquery.cookie.min.js” (as shown in my previous reply) to get rid of this issue. This problem resolved completely by adding this script file in my theme.

    It was working in wordpress default theme but in my theme to get it work I need to add script in header.php file after wp_here().

    Regards,
    Rishabh

    • This reply was modified 7 years, 11 months ago by rish30990.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin not working with latest version of wordpress!’ is closed to new replies.