• Resolved bluebeep

    (@bluebeep)


    I am testing Envira gallery on a new site and getting an error: s.get(0).style.removeAttribute(“filter”) is not a function

    The workaround is to edit envira-min.js and make two replacements:
    s.get(0).style.removeAttribute("filter") --> replace with: s.get(0).style.removeProperty("filter")
    and
    o.get(0).style.removeAttribute("filter") --> replace with: o.get(0).style.removeProperty("filter")

    Then it works fine without errors. This is strange because I can’t find anyone else complaining on this error for Envira. It is even more strange because if I debug this in Chrome, then the “s.get(0)” is of type div#envirabox-content in debugger, and “s.get(0).style” object is of type CSSStyleDeclaration, and looking in the docs, this type of object has only removeProperty function and not removeAttribute. So this looks like a bug, but how come it works on other sites?

    Do you know what can be the reason of such error?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi #bluebeep 🙂

    Hmm, I can’t say I’ve ever seen that one before? Did you already try deactivating the theme and other plugins to check for a conflict? Is it only on the pages where you have a gallery or on all pages?

    Hi @bluebeep and @akyusa01

    I have just installed the Envira Gallery Lite on a new site and I’m getting the same error. I’ve tried the suggested fix and that resolves it, but it’s obviously not ideal to modify core plugin file.

    The error only occurs for me when I click an image and lightbox opens and I can’t close lightbox due to error, otherwise gallery is displaying fine with no errors.

    Thanks for the update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘s.get(0).style.removeAttribute(“filter”) is not a function’ is closed to new replies.