You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Chris Haynes (JIRA)" <ji...@apache.org> on 2010/05/05 14:01:05 UTC

[jira] Created: (JSPWIKI-650) Page when printed shows entire page, not just content

Page when printed shows entire page, not just content
-----------------------------------------------------

                 Key: JSPWIKI-650
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
             Project: JSPWiki
          Issue Type: Bug
          Components: Default template
    Affects Versions: 2.8.3
         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
            Reporter: Chris Haynes


When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.

I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.

The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').

The fix is to reverse the order of these two links (and remove the duplication detailed below).

The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.

A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JSPWIKI-650) Page when printed shows entire page, not just content

Posted by "Florian Holeczek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Holeczek updated JSPWIKI-650:
-------------------------------------

     Original Estimate:     (was: 1h)
    Remaining Estimate:     (was: 1h)

removing "Original Estimate"

> Page when printed shows entire page, not just content
> -----------------------------------------------------
>
>                 Key: JSPWIKI-650
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.3
>         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
>            Reporter: Chris Haynes
>
> When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.
> I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.
> The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').
> The fix is to reverse the order of these two links (and remove the duplication detailed below).
> The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.
> A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-650) Page when printed shows entire page, not just content

Posted by "Dirk Frederickx (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864314#action_12864314 ] 

Dirk Frederickx commented on JSPWIKI-650:
-----------------------------------------


What you say is correct: the jspwiki-print.css should be emitted AFTER jspwiki.css, cause the print stylesheet is a delta on top of the main stylesheet.


However, looking at v2.8.3 (I have checked svn-13)  the order of the stylesheet links is correct between line 23 and 28 in common-header.jsp.
It is indeed true that the order should be reversed at lines 79 and 92  (alternate stylesheet)  but I don't think these are overruling the first lines. (they probably can be removed both)

Looking at www.jspwiki.org, you can also see that the download order of the css sheets is correct.  (tested on os-x, firefox and safari)



dirk

> Page when printed shows entire page, not just content
> -----------------------------------------------------
>
>                 Key: JSPWIKI-650
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.3
>         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
>            Reporter: Chris Haynes
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.
> I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.
> The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').
> The fix is to reverse the order of these two links (and remove the duplication detailed below).
> The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.
> A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JSPWIKI-650) Page when printed shows entire page, not just content

Posted by "Chris Haynes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Haynes resolved JSPWIKI-650.
----------------------------------

    Resolution: Not A Problem

Probably caused by a Chrome 5.0.342.9 beta bug (on Linux).

> Page when printed shows entire page, not just content
> -----------------------------------------------------
>
>                 Key: JSPWIKI-650
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.3
>         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
>            Reporter: Chris Haynes
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.
> I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.
> The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').
> The fix is to reverse the order of these two links (and remove the duplication detailed below).
> The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.
> A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JSPWIKI-650) Page when printed shows entire page, not just content

Posted by "Florian Holeczek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Holeczek closed JSPWIKI-650.
------------------------------------


closing

> Page when printed shows entire page, not just content
> -----------------------------------------------------
>
>                 Key: JSPWIKI-650
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.3
>         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
>            Reporter: Chris Haynes
>
> When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.
> I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.
> The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').
> The fix is to reverse the order of these two links (and remove the duplication detailed below).
> The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.
> A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JSPWIKI-650) Page when printed shows entire page, not just content

Posted by "Chris Haynes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864330#action_12864330 ] 

Chris Haynes commented on JSPWIKI-650:
--------------------------------------

 I was wrong above about the first pair being the wrong way round - I lost track of what changes I made to work around this bug. 

Now I try to reproduce it it appear it was only manifesting when I used Chrome 5.0.342.9 beta in Ununtu.
Maybe its a bug in Chrome - that it is applying the 'alternate spreadsheets' (overwriting the previously-inserted ones) without awaiting user instruction!

So - probably a Chrome bug, not a JSPWiki one. Sorry!

> Page when printed shows entire page, not just content
> -----------------------------------------------------
>
>                 Key: JSPWIKI-650
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-650
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.3
>         Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP.
>            Reporter: Chris Haynes
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed.
> I have taken as authoritative  Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below.
> The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css').
> The fix is to reverse the order of these two links (and remove the duplication detailed below).
> The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant.
> A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.