• Resolved epaslv

    (@epaslv)


    Under certain conditions $photonic_slideshow_library is NULL in photonic.php, and wp_enqueue_script injects a include/scripts/.min.js in header, which produces a 404

    see below

    photonic.php line 215

    else if ($photonic_slideshow_library != ‘none’) {
    wp_enqueue_script(‘photonic-lightbox’, plugins_url(‘include/scripts/’.$photonic_slideshow_library.’/’.$photonic_slideshow_library.’.min.js’, __FILE__), array(‘jquery’), $this->version);

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Can you specify which conditions? Have you tried saving the options?

    Thread Starter epaslv

    (@epaslv)

    I just noticed this as I was fixing a clients website, unrelated to this issue.
    So I have checked the options and Swipebox was selected as default, I dint change any setting, jut hit save and a page reload now shows a valid file now as per er below

    <link rel=’stylesheet’ id=’photonic-lightbox-css’ href=’https://cym.org/wp-content/plugins/photonic/include/scripts/swipebox/css/swipebox.min.css&#8217; type=’text/css’ media=’all’ />

    So for some reason the option variable for $photonic_slideshow_library was null in MySQL

    Just an FYI really, you may want to check for nulls

    Plugin Author Sayontan Sinha

    (@sayontan)

    The reason I asked for the specific conditions is because in the very first step in the process, when the plugin initializes, I assign default values to all options, even if none is set. Basically there is a full set of files for options that is first read, and then if a particular option doesn’t exist in the DB, it is assigned from the file.

    Essentially I don’t need to check for nulls because this step implicitly assigns values to everything (none of the options has a default value of null). I have tested this on sites where the plugin is being deployed for the first time without saving the options, and it still works fine. I will check nonetheless.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘$photonic_slideshow_library is NULL’ is closed to new replies.