• Resolved TeqToo

    (@teqtoo)


    I wonder if you can help with this. I’m using a child of twenty-eleven on three different sites, along with a number of plugins including NextGen Gallery and Slideshow by StefanBoonstra.

    I have installed a new plugin – Simple Lightbox Gallery by Weblizar. The plugin does exactly what I want it to do for a particular page on my site, but it seems to have a conflict somewhere, either with the child theme itself, or something in one of the plugins. I have tried deactivating each plugin one by one, and then refreshing the page, and nothing seems to resolve the issue.

    The issue can be seen at all three of the websites:

    http://accutonepiano.com/responsive-lightbox-gallery-page-test/
    http://atlanticliners.com.50-22-24-130.servelink.com/gallery-test/
    http://www.carriage-house-inn.com/?page_id=1029

    After clicking on one of the photos to bring up the lightbox, you will probably notice that the navigation buttons (forward/back/exit) that are contained in the narrow band at the bottom of the lightbox are invisible, even though they are there if you mouse over that area. This renders the plugin useless for my purposes – how will anyone know how to scroll through the slides if they can’t see the navigation buttons?

    The plugin author has tried to help, but we’re at somewhat of an impasse. I just thought if I posted here I might be able to get some suggestions, seeing as Crouching Bruin has been able to troubleshoot a number of issues related to similar oddities for me.

Viewing 10 replies - 1 through 10 (of 10 total)
  • It’s not a theme issue at all, and it’s not a conflict. It’s a bug in the plugin.

    The plugin is using http://accutonepiano.com/wp-content/plugins/simple-lightbox-gallery/lightbox/img/icons.svg for the background image URL on the button. That doesn’t exist (and probably wouldn’t work if it did exist). It looks like the correct URL is http://accutonepiano.com/wp-content/plugins/simple-lightbox-gallery/lightbox/img/icons.png

    When I change the background-image URL in my browser debugger (on all three buttons), they look right.

    Thread Starter TeqToo

    (@teqtoo)

    Hmmmm, my son did find something similar when he put the page in his debugger, but we couldn’t figure out how to fix it. What baffles me is that I’ve started a new site with a different theme, and in that site the gallery seems to work fine – and I don’t see any difference in the code. If you can see where the difference is, please let me know. Especially if there’s a way to fix it.

    http://nysbs.org/newsite/gallery-2/

    OK. The svg file is actually present on all your sites.

    You have an issue with the server configuration. The site that works (nysbs.org) is serving *.svg files with a “Content-Type: image/svg+xml” html header. The other domains are serving the *.svg file with a “Content-Type: text/xml” html header. Since you’re using the icons.svg file as a background image, the browser won’t use the file because the web server told it that icons.svg is a text/xml file, not a valid image.

    What web hosting service are you using? Look for “MIME Types” on your control panel for the web hosting accounts, and configure those accounts to send *.svg (and *.svgz) files with a MIME type/Content-type of “image/svg+xml”

    You can verify this from the command line with wget:

    This is the one that works.

    $ wget -O – -o /dev/null –save-headers http://nysbs.org/newsite/wp-content/plugins/simple-lightbox-gallery/lightbox/img/icons.svg
    HTTP/1.1 200 OK
    Date: Sat, 15 Aug 2015 18:42:01 GMT
    Server: Apache
    Last-Modified: Wed, 05 Aug 2015 16:32:17 GMT
    Accept-Ranges: bytes
    Content-Length: 1431
    Keep-Alive: timeout=5, max=100
    Connection: Keep-Alive
    Content-Type: image/svg+xml

    Here’s one with the problem:

    $ wget -O – -o /dev/null –save-headers http://accutonepiano.com/wp-content/plugins/simple-lightbox-gallery/lightbox/img/icons.svg
    HTTP/1.1 200 OK
    Date: Sat, 15 Aug 2015 18:44:39 GMT
    Server: Apache
    Last-Modified: Sun, 02 Aug 2015 12:12:58 GMT
    ETag: “7ae03c0-597-51c52f93d6680”
    Accept-Ranges: bytes
    Content-Length: 1431
    Vary: Accept-Encoding,User-Agent
    X-Powered-By: PleskLin
    Keep-Alive: timeout=3, max=300
    Connection: Keep-Alive
    Content-Type: text/xml

    Until that last line comes from the server with “Content-type: image/…”, that plugin won’t work (neither will anything else that uses *.svg files for background images).

    Until then, if the developer can tell you where the ‘icons.svg’ text is, you could change it to ‘icons.png’ instead. I found the ‘icons.png’ file in the same directory as icons.svg on the accutonepiano.com site.

    Thread Starter TeqToo

    (@teqtoo)

    Oh, that’s interesting! I just saw your response to this question on the Plugin’s support forum, and noticed that you said my “server is misconfigured for *.svg files.” It would make sense, then, that I’m not having the same issue with the other website I am working on, because that site is hosted with a different hosting company!

    Is there anything I can tell my web host that they could fix on the server so that the plugin would work properly?

    Who is your hosting company? What kind of control panel do you have for the hosting service?

    Usually, you have the controls in your web hosting “control panel” to set this for your hosting account(s). For example, if your hosting service uses “cPanel” for the control panel, look for “MIME Types” on the main cPanel page.

    You need the “MIME type” for files ending in ‘.svg’ and ‘.svgz’ to be set to “image/svg+xml”

    If you need more info, you can email me, eric at mrmfl dot net.

    Thread Starter TeqToo

    (@teqtoo)

    I will have to check this – my web hosting company uses Plesk control panel.

    Maybe this helps:

    How to Add a Mime Type to a Domain in Plesk

    Or check with tech support at your hosting service. Even the ‘live chat’ people can probably find the information for you.

    UPDATE:

    I found this page, which has better pictures to follow:
    How to add new MIME type

    Add two. For the first one, the extension is .svg and the application ‘image/svg+xml’. If that isn’t a choice, pick the “custom…” and enter ‘image/svg+xml’ there.

    In case your plugin developer compresses his files, add the extension ‘.svgz’ with the same ‘image/svg+xml’ information.

    Thread Starter TeqToo

    (@teqtoo)

    I’ve contacted my hosting company, and they say the instructions linked to above for adding a MIME type in Plesk are for an older version of Windows Plesk. To add a MIME type in a Linux hosting environment, I would need to create an .htaccess file. I’m going to have to research this some more.

    Wow. I just realized that’s how the cPanel interface works, adding line(s) to “/public_html/.htaccess’.

    This isn’t hard to do manually. Just put this line at the top of the .htaccess file in your site’s root directory.
    AddType image/svg+xml svg svgz

    Depending on your permalinks settings, there could be a WordPress section that start with a ‘# BEGIN WordPress’ line and ends with a ‘# END WordPress’ line. DO NOT put your AddType line in that section. WordPress will overwrite that section and wipe out your addition sometimes (for example if you change your permalink settings).

    You can use FTP or your file management tools on your hosting service to update the .htaccess file, or you could use the WordPress .htaccess editor plugin.

    Always make a backup of your .htaccess file using FTP or your hosting control panel before changing that file. A corrupt .htaccess file can make the directory unreachable through the web (it can cause “5xx” web server errors), so if you use the plugin to edit the file, you might not be able to get to the plugin to restore its backup file.

    In case you’re interested. Apache documentation about the AddType Directive.

    Thread Starter TeqToo

    (@teqtoo)

    WOWEEEEEE! It worked! Thank you so much for finding this and taking the time and trouble to talk me through the solution! You are my new web GURU! (Don’t tell my web host…he thinks he is the only one.)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Help with possible conflict’ is closed to new replies.