Failed to load simplified page in Print Preview
Categories
(Toolkit :: Reader Mode, defect, P3)
Tracking
()
People
(Reporter: rpopovici, Assigned: fchasen)
Details
Attachments
(2 files, 1 obsolete file)
Found in
- Fx 103.0b5
Affected versions
- Fx 103.0b5
Affected platforms
- Windows 7
- Windows 10
- Ubuntu 16
Steps to reproduce
- Open Firefox
- Navigate to https://en.wikipedia.org/wiki/Main_Page
- Click on Reader view icon
- Press CTRL+P
- Select "Simplified" option from the Format section
Expected result
- Website content on Reader view with simplified format is displayed correctly in Print Preview
Actual result
- "Failed to load article from page" error message is displayed in Print Preview. See attachment.
Regression range
- no regression
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Frank and I spent some time looking at this. He can reproduce, but I can't, and it was unclear why.
One observation we made is that when entering print preview from Reader Mode you're essentially printing a simplified page. Nonetheless, for Frank the Format radio buttons were enabled (visible) and, perhaps counterintuitively, the "Original" radio button is selected. For me, the Format radio buttons don't show at all.
To me, it seems like the radio buttons should not be shown since the print code doesn't have access to the original (non-Reader mode/simplified document) and so can't actually switch between Simplified/Original.
Anyway, the code in play here is really frontend code, so moving this to Toolkit. Mark, would you be able to take a look?
Comment 3•3 years ago
|
||
Looking at the code path we show the option if isArticle is true. We could do some other check to detect if it's in reader mode but since reader mode fails on that document it seems like a check that should probably happen in Readerable
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
(In reply to Mark Striemer [:mstriemer] from comment #3)
Looking at the code path we show the option if
isArticleis true. We could do some other check to detect if it's in reader mode but since reader mode fails on that document it seems like a check that should probably happen in Readerable
Reader mode will fail because all the classes and IDs that are on the original document and that inform which things we think are "important" or "not important" are stripped out by reader mode, and we simplify the DOM structure so it's less likely that there's a single common ancestor that encapsulates all the content we want.
Not offering the option for pages printed from reader mode seems like a fine idea.
| Assignee | ||
Comment 5•3 years ago
|
||
Reader pages seem to have isArticle=true when pressing the reader button on the original page, but isArticle=false when navigating to them directly.
I added a check for about:reader urls in the hide / show of the simplification option instead of just relying on isArticle.
| Assignee | ||
Comment 6•3 years ago
|
||
Checks if the url for the page to be printed starts with about:reader and if so prevents showing the option for printing the simplified version (which would result in an article load failure).
Updated•3 years ago
|
| Assignee | ||
Comment 7•3 years ago
|
||
In reader mode isArticle should always be false, as the content can not be further simplified.
This sets isArticle to false on load for reader pages and prevents calling
_isLeavingReaderableReaderMode on page hides other than when leaving reader mode.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Backed out for causing failures on browser_readerMode.js.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=395295212&repo=autoland
https://treeherder.mozilla.org/logviewer?job_id=395292072&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/ff34dfd9c8acf53e0d6dbba91548905d2e9171ed
Updated•3 years ago
|
Comment 10•3 years ago
|
||
| Assignee | ||
Comment 11•3 years ago
|
||
Removed the changes for isArticle and re-landed the change to check for reader mode when printing.
Comment 12•3 years ago
|
||
(In reply to Fred Chasen [:fchasen] from comment #11)
Removed the changes for
isArticleand re-landed the change to check for reader mode when printing.
FWIW the bug will be closed as fixed automatically when your patch makes it to mozilla-central (and this will also set the target milestone + individual release tracking flags correctly, which helps track uplifts etc.). So going to reopen this for now. :-)
Comment 13•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Updated•3 years ago
|
| Reporter | ||
Comment 14•3 years ago
•
|
||
Verified that now option to simplify reader mode pages in print preview is no longer displayed using Firefox 108.0b3 and latest Nightly 109.0a1 across platforms (Windows 10, Windows 7, macOS 11.6 and Ubuntu 20)
Description
•