Print preview layout as default layout in chrome ?!?

avatar Ilija Studen Staff Jul 6. 2011. 3:48 pm
Thank you for the followup.

We'll do more extensive tests in beta version, to make sure that there's no compatibility problems with upcoming releases (found no issues so far).
avatar peterlozano Sep 3. 2011. 12:05 pm
I found this in activecollab headers:

    <link rel="stylesheet" href="https://XXX/public/assets/print.php?v=2.3.2&modules=system,resources,milestones,reports,public_submit,planning,source,status,invoicing,inline_pagination,incoming_mail,documents,checklists,backup,discussions,files,calendar,pages,tickets,timetracking,mobile_access,communications,tickets_plus,time_reports_plus," type="text/css" media="print" />
    <link rel="stylesheet" href="https://XXX/public/assets/themes/acPRO/print.css" type="text/css" media="print" />
    <link rel="alternate stylesheet" href="https://XXX/public/assets/print_preview.php?theme_name=acPRO" type="text/css" media="screen" id="print_preview_css" disabled="true" />



Note that the last stylesheet is media="screen", shouldn't that be media="print"?
avatar peterlozano Sep 3. 2011. 12:22 pm
I found a workaround.

Using the userScriptCSS chrome extension. You can inject this javascript code in active collab pages with this problem.

$(document).ready(function() {
  $('link[rel*="alternate stylesheet"]').attr('media', 'print');
});
avatar Ilija Studen Staff Sep 3. 2011. 12:31 pm
peterlozano:
Note that the last stylesheet is media="screen", shouldn't that be media="print"?


activeCollab will show you, in browser, how the page will be printed (it's Print Preview feature), so media type should be screen for preview purpose. That same stylesheet is than applied to print as well.

We had a similar problem reported for Safari 5 and got it covered with activeCollab 2.3.4, but Chrome obviously has their own build of WebKit that behaves differently.
avatar mitja Pro Sep 5. 2011. 2:19 pm
So it seems that this is not a Chrome bug (at least Google Chrome Team doesn't think so). Until then aC is completely unsuable in Chrome 13 and up. We are waiting for 3 months to get a fix. Instead it is easier to sit wait for Google Chrome Team - just advise users to use stable versions of Chrome and hope they will change something. Unfortunatelly some of us have to use dev channel browsers since we are testing our own applications (and they work on dev channel builds - they must).

Please Ilija get this sorted out. I'm using Safari just for aC which is really painful and time consuming (all URIs open in Chrome by default). Peter found a workaround, you wrote you already got a similar problem with Safari and fixed it. You can even write a solution and post it here so that we can change the code ourselves. The least you can do is point us in the right direction.

Thank you in advance.
avatar Oliver Maksimović Staff Sep 8. 2011. 11:26 am
Apparently, the problem with alternate stylesheet is caused by the fact that the link tag doesn't have - a title! Seems like an old rule (and not mentioned that much) that some browsers respected sometimes, others ignored it, and some of them started to respect it recently :)

Quick fix:
- Open /activecollab/application/modules/system/layouts/wireframe.tpl in a text editor
- Find the line 17, which should look something like this:
<link rel="alternate stylesheet" href="{$assets_url}/print_preview.php?theme_name={$theme_name}" type="text/css" media="screen" id="print_preview_css" disabled="true" />

- Replace that line of code with this one:
<link rel="alternate stylesheet" href="{$assets_url}/print_preview.php?theme_name={$theme_name}" type="text/css" media="screen" id="print_preview_css" disabled="true" title="Print Preview" />
activeCollab dev / tech support
avatar mitja Pro Sep 8. 2011. 12:12 pm
Works like a charm ;)

Thank you Oliver!

Regards.
avatar Ilija Studen Staff Sep 16. 2011. 8:22 pm
Officially covered with activeCollab 2.3.5.
avatar stex Pro Sep 18. 2011. 11:40 pm
AC 2.3.2 here. Suddenly this is happening to my whole team on Chrome. We're all using the latest Chrome update (standard, not dev channel or anything like that).

Chrome Version: 14.0.835.163 m

Is there a fix for this?

NVM, didn't see there was a second page of comments. (::facepalm::)
avatar Guy C. Dev Sep 18. 2011. 11:47 pm
Thanks for this quick fix. It works great. All installations are now at 2.3.4 with the quick fix and everyone can run Chrome again.
www.esolvesolutions.com
or Go To Next Page

Try activeCollab free for 30 days, No credit card required!

Instant access to activeCollab, no installation needed.

.tryactivecollab.com

If you are already a user of activeCollab, you can log in here.