Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined request (404 error) on Divi when using WebP <picture> tag method #517

Open
markonikolic985 opened this issue Sep 23, 2020 · 1 comment
Labels
3rd party compatibility needs: discovery priority: medium Issues which are important, but no one will go out of business. type: enhancement

Comments

@markonikolic985
Copy link
Contributor

markonikolic985 commented Sep 23, 2020

Describe the bug
When using Divi theme and activate WebP display using tag method, there is failed request in console (https://example.com/undefined), also visible in GTMetrix like this:

Screen Shot 2020-09-23 at 4 10 36 PM

And in console it looks like this:

Screen Shot 2020-09-23 at 4 12 48 PM

The problem is related to Divi's custom.unified.js file, line 80. When unminified, this function looks like this:

t("#logo").length &&
                            ((q = t("#logo").attr("src")),
                            (Q = function () {
                                var e,
                                    n,
                                    r,
                                    i = t("#logo"),
                                    o = "svg" === i.attr("src").substr(-3, 3);
                                t("body").append(t("<div />", { id: "et-define-logo-wrap", style: "position: fixed; bottom: 0; opacity: 0;" })),
                                    (e = t("#et-define-logo-wrap")),
                                    o && e.addClass("svg-logo"),
                                    e.html(i.clone().css({ display: "block" }).removeAttr("id")),
                                    (n = e.find("img").width()),
                                    (r = e.find("img").height()),
                                    i.attr({ "data-actual-width": n, "data-actual-height": r }),
                                    e.remove(),
                                    A(!0);
                            }),
                            (($ = new Image()).onLoad = Q),
                            ($.onload = Q),
                            ($.src = q)),

And it looks like a problem in this part ($.src = q).

If this function is completely removed, the issue is gone. I guess Imagify fetch this dynamically when nothing is defined yet, so the error occurs.

Steps to reproduce the behavior:

  1. Activate Divi theme (or make sure it is active)

  2. Activate WebP display option ( tag method) in Imagify settings

  3. Visit the site (front-end) and check Console output or test website in GTMetrix

@paaljoachim
Copy link

paaljoachim commented Jul 7, 2021

Hi

We turned on webP in Imagify and noticed a while later that an undefined error showed up when we tested in gtmetrix.
We noticed it affected the SEO at https://coinno.no over the last few weeks. Coinno also uses Divi.

I cloned the live site to a dev site and again turning off plugins and noticed that it was Imagify that caused the problem. I also assumed that it was webP that was causing the 404 error.

I have had to turn off webP to remove the error. Hopefully this error can be fixed soon!
Thank you!

@piotrbak piotrbak added priority: medium Issues which are important, but no one will go out of business. type: enhancement labels Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility needs: discovery priority: medium Issues which are important, but no one will go out of business. type: enhancement
Projects
Support Wishlist
Awaiting triage
Development

No branches or pull requests

4 participants