Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2006 at 09:06 UTC
Updated:
22 Jun 2009 at 12:34 UTC
I am running Drupal 4.7.2. I have installed the latest versions of 'printer friendly pages' module and Gmap module (http://drupal.org/node/33591). Printer friendly pages module is working perfectly for all pages. Gmap module is also working fine.
However, when I view a printer friendly page and the original node contains a gmap, the gmap is not displayed. Internet Explorer 6 shows an error message that 'problems on this page might make proper presentation of this page impossible'. Firefox 1.5 does not give a warning, but doesn't display the gmap either.
This 'bug' is unfortunate, because maps are often printed for use when traveling.
Comments
Comment #1
jcnventuraCan you try with the latest 5.x dev release?
Comment #2
jcnventuraNobody answered, but I have tested this, anyway.
This can't get solved because the Google maps API requires a different key depending on the location of the page. So a page residing in www.example.com/print will require a different key than a page in www.example.com/content.
So, basically there's a choice between being able to show the gmap in the printer-friendly version page or in the original page. I think that most content writers will go for the latter..
Until Google changes their API (or the gmap module is able to handle several keys, this can never get fixed).
Because maybe the latter is a more feasilble possibility, I am moving this issue to the gmap module.
João
Comment #3
jcnventuraThe need for different keys is covered by http://drupal.org/node/185750
Comment #4
bdragon commentedThat is only correct if you accidentally generated your key for www.example.com/content instead of www.example.com.
Always generate your key against the drupal root folder!
Comment #5
sl27257Might be related to the following which fixed it for me.
http://drupal.org/node/217439
/Thomas
Comment #6
jcnventuraYes,
It was actually a combination of both. When I tried to test this, I read Google's terms which stated that I needed a key per directory. Since print uses it's own path (/print) I thought that there was no way to solve it without multiple key support. So I reported it to this module.
I had to wait for your later bug report with the explanation of why it didn't work to understand what the problem was.
Since the problem (and the fix) are all the responsibility of the print module, I am moving back the issue there. And I am marking it as a duplicate of #217439: Include Java-script in the header so that e.g. Google-maps, can be printed.
João Ventura
Comment #7
halver commentedSorry to be so clueless, but did this ever get resolved? I'm having the same problem, using Drupal 6.10 and Printer, e-mail and PDF versions 1.4. I have inserted the 'location map' block into the page using Composite Layout and it does not show up in the printer friendly version. Is it perhaps because of the Composite Layout module?
Thanks, and again, I'm not very proficient at this stuff yet, so your reply will need to be as basic as possible.
Comment #8
h3000 commentedHi,
I also have this same problem.
I added the following code in my print.node-content_type.tpl.php file:
However, when I view the page (the printer friendly page), it only shows a string that says "Javascript is required to show this map...".
The node has a location set for it and the map appears when viewing the normal full node page.
My setup is:
Printer Friendly Pages 6.x-1.6
GMap 6.x-1.1-rc1
Drupal 6.12
Apache 2
PHP 5
MySQL 5
Thanks for any information
Comment #9
jcnventuraCan I access an URL with this map? I need to check one thing..
I am suspecting that the gmap module is not doing something right, but I need to confirm it.
João
Comment #10
h3000 commentedHi João,
The following is a printer friendly version of a node with a map that is supposed to appear at the bottom of the page:
http://www.shenzhenparty.com/print/34829
Only the text "Javascript is required to view this map." is appearing.
Thanks
Comment #11
jcnventuraThe original page doesn't show any map nor any reference to gmap.. I am assuming that you're setting up a print.tpl.php that does include the gmap.
If so, then you need to make sure that the gmap javascript include is added to the output.. You'll have to add it manually in the template, as the page generation by the print module reuses all the includes of the original page.
Comment #12
h3000 commentedHi,
Here is another url: - http://www.shenzhenparty.com/print/28369 - location blocks are only appearing for admin users - not yet enabled for other users - its only enabled on the printer friendly version for this.
How do I include the javascript? I have the following lines in my print-node-content_type.tpl.php file:
-
<script type="text/javascript" src="sites/all/modules/gmap/js/gmap.js"></script>-
<style>@import "sites/all/modules/gmap/gmap.css";</style>However, the result is still the same.
Thanks
Comment #13
jcnventuraOne feature of relative paths is that they're relative to the current path.. By setting these paths to 'sites/all/...', the browser will try to load them from hxxp://www.shenzhenparty.com/print/sites/all/...
Simply add a '/' to the beginning of the path and I think it should start working.
Comment #14
jcnventuraNo further info in 2 weeks. Closing the issue.