Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Page printing problems in 3.7.3 vs. 3.6.7 (http://forum.bytesforall.com/showthread.php?t=17569)

Douglas May 15, 2012 02:22 PM

Page printing problems in 3.7.3 vs. 3.6.7
 
Printing "page" pages no longer functions properly after manually updating (with all fixes) from 3.6.7 to 3.7.3. Chrome still works okay, but both Firefox and IE produce blank first pages and then only some content on subsequent pages. Switching back to 3.6.7 (still installed in themes) corrects the problem.

Pages on our site (http://www.piercenet.com/previews/) are listed in the left sidebar as Product Articles. Individual pages have a right "sidebar" that is actually part of the center content in the page template, so it should (and normally does) print as part of the page.

Any thoughts on what underlying code change in 3.7.3 might have caused this function to break?

lmilesw May 15, 2012 02:26 PM

Is there some reason you didn't upgrade to 3.7.6. If you need to stay at 3.7.3 there are several patches for it in the New Versions and Updating forum.

juggledad May 15, 2012 05:41 PM

There were changes made to the CSS to prevent the sidebars from printing. If you need to have the right sidebar appear when printing, you will need to edit the file css.php and find lines 2039-2072 which should be
HTML Code:

        #header,
        #footer,
        .colone,
        .colthree,
        .navigation,
        .navigation-top,
        .navigation-middle,
        .navigation-bottom,
        .wp-pagenavi-navigation,
        #comment,
        #respond,
        .remove-for-print {
                display: none;
                }

        td#left, td#right, td#left-inner, td#right-inner {
                width: 0;
                display: none;
                }

        td#middle {
                width: 100% !important;
                display: block;
                }

        /* 8 hacks for display:none for all sidebars for all browsers except IE. */

        *:lang(en) td#left {
            display: none;
                }
               
        *:lang(en) td#right {
            display: none;
                }

and change them to
HTML Code:

        #header,
        #footer,
        .colone,
           
        .navigation,
        .navigation-top,
        .navigation-middle,
        .navigation-bottom,
        .wp-pagenavi-navigation,
        #comment,
        #respond,
        .remove-for-print {
                display: none;
                }

        td#left,          td#left-inner, td#right-inner {
                width: 0;
                display: none;
                }

        td#middle {
                width: 100% !important;
                display: block;
                }

        /* 8 hacks for display:none for all sidebars for all browsers except IE. */

        *:lang(en) td#left {
            display: none;
                }
               


Douglas May 16, 2012 06:59 AM

Quote:

Originally Posted by lmilesw (Post 85174)
Is there some reason you didn't upgrade to 3.7.6. If you need to stay at 3.7.3 there are several patches for it in the New Versions and Updating forum.

Thanks, but I don't like to upgrade to brand new versions because I don't want to be the one to discover bugs. I did apply all of the patches for 3.7.3.

Douglas May 16, 2012 07:12 AM

Thanks Juggledad. I'll take a look at those code changes. However, as I stated in my message, what looks like a right sidebar on our "page" pages is actually part of the center content, NOT a sidebar, so I didn't expect that it should have been affected by the sidebar printing changes.

Try to print the following page viewed in Firefox:
http://www.piercenet.com/previews/20...-synaptosomes/

The first two pages of content are blank in the print preview (as well as to an actual printer). The right column (not a sidebar) does seem to be included correctly in the printed content, as suggested by the wide right margin space on pages 3 and 4.

So, it seems like a more general printing problem, not a sidebar issue.

Any other ideas? Thanks so much.

juggledad May 16, 2012 08:26 AM

please remove all widgets from the left sidebar and try it again

Douglas May 16, 2012 08:31 AM

I'll have to try that on our development server - can't do without the sidebars widgets on the live site.

If that corrects the problem, what will be the solution? I can't just permanent do without the left sidebar widgets!

Thanks.

juggledad May 16, 2012 09:04 AM

it seems that the browsers (at least Firefox) does not like something in the left sidebar. There is no problem with Safari on my Mac - it's the way the browsers are interpreting things.

Douglas May 16, 2012 09:13 AM

So how does that explain why 3.6.7 works just fine? Can I just replace the print CSS code in 3.7.3 with the code from 3.6.7, or is there other places where the two versions of Atahualpa differ with respect to printing?

juggledad May 16, 2012 09:34 AM

try it. The print css was changed because there were errors in the printing - sidebars were printing.

With the differences in browsers no one solution is guaranteed to work in all places. You may find that if you add the old CSS in, it will then work in IE but another browser might be broken (I just love standardization)

Douglas May 16, 2012 02:24 PM

Okay, I was able to correct the problem by commenting out the following two lines of CSS:
Line 2056 (display: none; )
Line 2061 (display: block; )

Print now works in IE, Firefox and Chrome. It's sort of curious that the exact change that was added to help printing actually caused a problem where there wasn't one. In any case, the problem appears to be solved as far as my site is concerned.

Now, if only there were a universal standard for telling browsers not to split images with page breaks when printing! No matter what I've tried, I can't get that one to work well.

lmilesw May 16, 2012 09:03 PM

As a test I just commented out those two lines and it totally messed up my printing.


All times are GMT -6. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.