Problem/Motivation
When asking for the Printer-friendly version on any book page like https://drupal.org/documentation/mobile or one of it's sub pages the output contains Add new comment for every (sub page).
This is not printer friendly.
How to reproduce
- Visit i.e. Native mobile apps https://drupal.org/node/1388470
- Click Printer-friendly version https://drupal.org/book/export/html/1388470
- Search for Add new comment (There are ~ 6 links)
Proposed resolution
Wait for the core fix #2141929: Comment link or form is added to print view mode.
The other quick fixes are all still core hot fix on the misc/print.css which are more bad then good. The better should be solved through #1338858: Include theme print stylesheets in Book printer friendly export.
Remaining tasks
Is this a book.module bug?
Comments
Comment #1
clemens.tolboomI've tested this on a clean Drupal 7 install locally using the Devel patch #303143: Generate hierarchical books using the UI not drush to generate 500 nested book pages.
The comment links are not visible so guess this is d.o specific.
I'm not sure how I can help any further now.
Comment #2
clemens.tolboomComment #3
helmo commentedConfirmed.
The css selector "li.comment-add" might be a bit better though.
Comment #4
clemens.tolboomA core hack works but I needed to find the real cause.
The title for the comment link is comment/comment.module: 'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')), which has some logic not respecting 'print' view mode
coming from #754760: "Add new comment" appears directly above comment form / "post comments" does not work without "access comments" permission.
Comment #5
clemens.tolboomRemoved the misc/print.css
A quick fix would be to hide the inline links which are generated by the book module.
Comment #6
clemens.tolboomJust tried https://drupal.org/book/export/html/2127611 to review #3
The patch done in #2141929: Comment link or form is added to print view mode. hides the the comment link when using the 'print' view mode.
I do thinks ALL links should be dropped when requesting a printer friendly page. Ie Facebook share or flag links should not be displayed either. Fortunately we do not have these or the modules do it right?
Below a snippet from the mentions export page above.
Please review #2141929: Comment link or form is added to print view mode.
Comment #7
tvn commentedPostponing till the core issue is fixed.
Comment #8
tvn commentedMoving to customizations to wait till the core issue is fixed.
Comment #9
drummWith #2762837: [Meta] Migrate documentation into the new system, Drupal.org no longer has the book module enabled.