• Resolved rstir9

    (@rstir9)


    Hi,

    None of the svgs-inline*.js files are loading for me. The plugin (latest version) has been activated with advanced mode enabled. I’m able to upload SVGs, and can see the ‘inline SVG’ functionality on featured posts in the admin section. However, none of the images on my page get converted to SVGs.

    I tried manually adding the script file above the body tag in my theme, and slightly modifying it to “$(‘img.style-svg’).each(function(index){“, and was able to get it working that way. I’ve tried checking the ‘output JS in footer’ option, and it makes no difference whether it’s checked or not. The only other plugin I am using is Advanced Custom Fields pro, and that one is working.

    Any idea what the problem can be?

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi,

    Sorry for the late reply! It’s been a busy day.
    If you could send me login details, I will take a look for you. [email protected]

    Plugin Author Benbodhi

    (@benbodhi)

    Comparing your line to the JS in the plugin, this will only address the default class… it won’t work if someone has set a custom class in the plugin settings.
    I’m not sure why that would be happening, I would have to check browser errors for more detail.

    EDITED: i have resolved my issue. Changing target class to default solves the problem.
    But custom class issue still persists.

    • This reply was modified 8 years, 2 months ago by dezechinees.
    Plugin Author Benbodhi

    (@benbodhi)

    woah, so (in SVG Support settings) if you leave the class field blank, everything works fine, but if you set a custom class, the inline JS file doesn’t load? Is that correct?

    Thread Starter rstir9

    (@rstir9)

    Hi,

    Thanks for getting back to me. It’s failing locally for me, but I will try to get it on a server in the next day or 2 and will send you an email.

    Thread Starter rstir9

    (@rstir9)

    I figured out what the issue was – I had this line of code in my theme :
    if (!is_admin()) {
    wp_deregister_script(‘jquery’);
    }

    deleting it fixed the issue.

    Plugin Author Benbodhi

    (@benbodhi)

    Glad you found it… bad practice using your own jQuery apparently, so it’s fpr the best ??

    Thanks for letting me know.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘JS not loading’ is closed to new replies.