• Resolved socratesone

    (@socratesone)


    >Downloaded the plugin and placed in wp-content/plugins.
    >Verified that it was present in list of plugins in admin interface.
    >Activated plugin
    >See new “Jssor Slider” menu item in admin navigation
    >Able to click and view administrative page at /wp-admin/admin.php?page=jssor-slider-admin
    >Tried to click on “Create Slider” and “Import Slider” – buttons did nothing except show :hover effect
    >Reloaded page – same issue
    >in console, I see the error:
    `Uncaught ReferenceError: wp_jssor_slider_admin_init is not defined
    (in file wp-admin/admin.php?page=jssor-slider-admin line 1026)
    > line attempts to create instance of “wp_jssor_slider_admin_init()”
    > Checked source code for admin page – wp-content/plugins/jssor-slider/interface/admin/js/wp.jssor.slider.admin.init.js is being loaded into the document <head>.
    >Checked the link to that file, and it loads minified JS which appears to have the function defined
    >Disabled all other plugins.
    >Still seeing the same issue
    >Deactivated and Reactivated plugin – same issue
    >Took closer look at wp.jssor.slider.admin.init.js, but code is minified.
    >Ran code beautifier to take a better look, but code is obfuscated/uglified
    >Looked through source code to find src version of file, but couldn’t find it.

    Using:
    jssor-slider Version 3.1.23 / (2018-09-22)
    WordPress 4.8
    PHP 5.3.28
    MySQL Ver 14.14 Distrib 5.5.40
    IIS Version 8.5.9600.16384
    Windows Server 2012 R2 Standard

    >Tried it in another environment (XAMPP – fresh install of WordPress 4.9.8)
    >It works fine. Really, a great plugin.

    However, I’m confused as to why it’s not working on my dev environment.

    Why would I be getting this issue? What would be the most likely scenario?

    Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter socratesone

    (@socratesone)

    Another thing happened while I attempted to delete (as apposed to “deactivate”):

    The notice “deleting…” hung for a while. After a few minutes, I refreshed the page.

    The plugin was no longer in the list of plugins. However, the folder was still present in windows explorer.

    When I tried to manually delete the folder, I get “access denied” error messages. I tried changing the permissions, but even as administrator I can’t change it. I’ve been trying to get rid of the folder for a while now.

    Thread Starter socratesone

    (@socratesone)

    Resolved the permissions issue (A 3rd party program locked the folder)

    > Upgraded dev environment to PHP 7.2 – same issue.

    I will continue to post here as I troubleshoot + debug.

    Thread Starter socratesone

    (@socratesone)

    Update: I found the problem (and the solution).

    The issue was my own optimization code for my theme. I gave my theme a “whitelist” of javascripts to load up-front, deferring all other scripts, for performance optimization. However, I neglected to add the new plugin’s javascript files to the whitelist.

    I made the incorrect assumption that modifications to my theme’s functions.php file would not effect the administrative theme, but apparently, I was wrong. Hooking into the “clean_url” filter to add “defer=’defer'” to all .js files except the ones on the whitelist was a mistake. I should have created a blacklist of files to defer to prevent this from happening.

    Thank you for the great plugin, BTW!

    Thread Starter socratesone

    (@socratesone)

    As an aside, I think it would be nice to allow these scripts to be defered. After all, do we really need to have a slideshow load before the page content? Get the image above the fold displayed, then allow the rest of the page to load, and then the deferred scripts.

    This, I fully admit, is a personal preference. It would be nice to have the option, however.

    Plugin Author jssor.com

    (@jssor)

    Load jssor slider fast is reasonable concern.
    And I think your concern is reasonable as well.

    As it requires 3rd party js library to detect page load to run jssor slider initialization script, we’d find approach to reduce the impact.

    Thanks a lot for leaving feedback!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Uncaught ReferenceError: wp_jssor_slider_admin_init is not defined’ is closed to new replies.