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

Replacing URLs within srcset attributes produces duplicate "https" prefix #223

Open
patrickposner opened this issue May 5, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@patrickposner
Copy link
Collaborator

Detailed description here: https://wordpress.org/support/topic/current-page-url-https-is-added-to-background-image-url-breaking-it/

Screenshot 2024-05-05 at 14 38 02

@patrickposner patrickposner added the bug Something isn't working label May 5, 2024
@pedddro
Copy link

pedddro commented Jul 2, 2024

@patrickposner this seems to be happening only when using an image background on the "Group" block.

"Cover", "Media & Text" and "Image" blocks, I get no issues.

@igorbenic
Copy link
Collaborator

@pedddro I couldn't reproduce it.

Do you know maybe if the original image has the site URL or something like that in it's name? So it gets replaced twice as the regex finds it there already?

Or is the page itself a paginated one? Could you copy the HTML of that page here so I can run tests through that HTML?

@pedddro
Copy link

pedddro commented Jul 23, 2024

@igorbenic steps to reproduce is just add a background image to any "Group" block. Other blocks, simply static seem to render correctly.

Here's a repro: https://poetic-beignet-545238.netlify.app/reproduce-simply-static-error/
Using cloudflare: https://simply-static-error.pages.dev/reproduce-simply-static-error/

@igorbenic
Copy link
Collaborator

igorbenic commented Jul 23, 2024

@pedddro Couldn't reproduce it with the group block.

Mine got replaced correctly:

Relative:
Screenshot 2024-07-23 at 19 51 34

Absolute:
Screenshot 2024-07-23 at 21 43 55

Would need if possible: original HTML that you can get from the editor by using the "Code Editor" instead of Visual Editor:

Screenshot 2024-07-23 at 21 44 58 Screenshot 2024-07-23 at 21 45 12

And also the general settings regarding URLs:
Screenshot 2024-07-23 at 21 46 27

I can then try running that locally and see if I can reproduce the same error and find out what could be causing it.

@pedddro
Copy link

pedddro commented Jul 23, 2024

@pedddro
Copy link

pedddro commented Aug 7, 2024

I managed to fix it manually by deleting the extra https:// + (the page's URL) that is added to the background image URL css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants