Saving a wikipedia page is missing images used from the page (because srcset attribute is not scanned/re-written)
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: digitalio995, Assigned: emilio)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Steps to reproduce:
Open a page, right click, "Save page as..."
Actual results:
The list of downloads shows an error. Some page files are saved, some are not.
Expected results:
Page is saved.
Comment 1•4 years ago
•
|
||
I can reproduce the issue on Nightly83.0a1 Windows10. Chrome works without failure.
- Open https://developer.mypurecloud.com/forum/t/problem-with-the-transcription-of-an-interaction/8507
- Click Accept button if Cookie Consent dialog pops up.
- Save page as(Ctrl+S) > Web page complete > Save
Comment 2•4 years ago
|
||
it fails everytime on Save Page As, but it works when retrying the download from the panel. That sounds like some principal/security failure...
Comment 3•4 years ago
|
||
(In reply to Alice0775 White from comment #1)
I can reproduce the issue on Nightly83.0a1 Windows10. Chrome works without failure.
- Open https://developer.mypurecloud.com/forum/t/problem-with-the-transcription-of-an-interaction/8507
- Click Accept button if Cookie Consent dialog pops up.
- Save page as(Ctrl+S) > Web page complete > Save
This looks to me like it's due to mixed content blocking. Can you file a separate bug? Although the result (download fails) is the same, I think the cause is different.
Comment 4•4 years ago
|
||
Can you attach your about:support information? I'd be particularly interested if you have something like uBlock origin or another ad or content blocker installed, or if you're using tracking protection (did you save the page from a private browsing window) ?
As it is, saving the mozilla homepage (which seems to be what you tried to do in comment #0, based on the screenshot) works for me in 82 beta on a relatively clean profile - but there are known issues with the page saving code when ad/tracking-blocking blocks some of the requests for parts of the page (bug 1445211).
(In reply to :Gijs (he/him) from comment #4)
Can you attach your about:support information? I'd be particularly interested if you have something like uBlock origin or another ad or content blocker installed, or if you're using tracking protection (did you save the page from a private browsing window) ?
As it is, saving the mozilla homepage (which seems to be what you tried to do in comment #0, based on the screenshot) works for me in 82 beta on a relatively clean profile - but there are known issues with the page saving code when ad/tracking-blocking blocks some of the requests for parts of the page (bug 1445211).
I have uBlock origin, and disabling it seems to solve the problem in most cases indeed. However, some pages still fail in one way or another.
For instance, saving https://en.wikipedia.org/wiki/Belousov%E2%80%93Zhabotinsky_reaction results in gif animations not shown in the saved page.
Comment 6•4 years ago
|
||
(In reply to Digi from comment #5)
For instance, saving https://en.wikipedia.org/wiki/Belousov%E2%80%93Zhabotinsky_reaction results in gif animations not shown in the saved page.
Let's morph to address this issue, then, as the uBlock issue is covered elsewhere.
The webbrowserpersist code, which walks the DOM and finds resources that need saving, would seem to be responsible for this, so I'm moving this over to the relevant component and adjusting the summary.
Assignee | ||
Comment 7•4 years ago
|
||
The issue is that we're not rewriting srcset
urls. Should be easily fixable.
Assignee | ||
Comment 8•4 years ago
|
||
(The fix was actually relatively straight-forward, but as it turns out there are close to zero tests for this, so I'm adding some)
Assignee | ||
Comment 9•4 years ago
|
||
Enum classes and a couple other simplifications.
Assignee | ||
Comment 10•4 years ago
|
||
Rewrite the srcset URIs appropriately...
This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.
Depends on D92132
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Assignee | ||
Comment 13•4 years ago
|
||
Thanks for asking me to add a test ;)
Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.
Depends on D92133
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
Backed out 2 changesets (Bug 1668414) for causing build bustages in WebBrowserPersistLocalDocument.cpp CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=317603861&repo=autoland&lineNumber=80398
Backout: https://hg.mozilla.org/integration/autoland/rev/892c085e3cba1bdd4169d415700ef3517cdcf248
Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
bugherder |
Comment 18•4 years ago
|
||
I think this might be fixed based on these last commits?
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 20•2 years ago
|
||
Comment 21•2 years ago
|
||
bugherder |
Description
•