Support » Theme: Klasik » Enqueued my-script.js Causes 302 Status in WordPress admin

  • Resolved Blue Lotus Works

    (@bluelotusworks)


    The following only affects the WordPress admin area and requires a fix by the theme author…

    Starting in version 0.7.1 and continuing through version 0.7.3 of the theme, my-script.js is enqueued but doesn’t exist and results in a 302 status as the request for
    “mysite.com/wp-content/plugins/home/serveraccount/public_html/wp-content/themes/klasik/includes/my-script.js?ver=4.1” is put into html source.

    In version 0.7.3, the error is at row 358 of the includes/theme-function.php file and can be seen here: https://themes.trac.wordpress.org/changeset?old_path=%2Fklasik%2F0.7.0&old=40539&new_path=%2Fklasik%2F0.7.1&new=41055#file97

    Since we can’t figure out the intent of the enqueue, the short term fix is to revert to version 0.6.9.8, the last version approved for the repository prior to the error per the history at https://themes.trac.wordpress.org/ticket/22279

    We’ll also contact the theme author as it appears they don’t much spend much time in the support area. Disappointed the theme review team didn’t catch this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Blue Lotus Works,

    Hope you’re well! 🙂

    I can’t also figure out the intent of that enqueue and the file also don’t exist. So I think it’s safe to say to just remove the line where the enqueue happened; since it is inside a function that simply add the built-in color-picker .

    Hope it helps! 🙂

    Take care,
    Calvin

    Thanks for confirming Calvin. Fix noted was for those that don’t want to mess with code. We commented the row out as follows

    /* COMMENT OUT BAD ENQUEUE BEGIN
        wp_enqueue_script( 'my-script-handle', plugins_url('my-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
       COMMENT OUT BAD ENQUEUE END */

    Keeping the thread open as the issue is not resolved until corrected by a theme release.

    Issue resolved in version 0.7.4. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enqueued my-script.js Causes 302 Status in WordPress admin’ is closed to new replies.