CGStaticMaps - No image

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

CGStaticMaps - No image

Post by naturelab »

I cannot get CGStaticMaps to function.

Fresh install / Minimal template.

Code: Select all

 {CGStaticMaps address='Paris FR' center='Paris FR' marker0='Paris FR' marker1='Amsterdam NL' zoom=12 markercolor='#efefef' size='250x250'}
http://diwana.co.uk/index.php

Am I using it incorrectly ?

Version / modules

Code: Select all

----------------------------------------------

Cms Version: 2.1.2

Installed Modules:

    AdminSearch: 1.0
    CGBlog: 1.13.3
    CGContentUtils: 2.1
    CGExtensions: 1.52.2
    CGGoogleMaps2: 0.99.3
    CGSimpleSmarty: 2.0.5
    CGSnapshot: 1.0
    CGStaticMaps: 1.0.0
    CMSContentManager: 1.1
    DesignManager: 1.1.1
    FileManager: 1.5.2
    FormBuilder: 0.8.1.3
    Gallery: 2.1.3
    JQueryTools: 1.3.8
    MicroTiny: 2.0.3
    ModuleManager: 2.0.2
    Navigator: 1.0.2
    News: 2.50.4
    Search: 1.50.2
    SimpleSiteInfo: 3.1
    SimpleSiteMgr: 3.1.1


User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGStaticMaps - No image

Post by velden »

Review your html source code: it's invalid.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

Ok - Sorry, that was a quick throw-up this morning :)

Rectified now.

Still not working though. Any ideas ?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGStaticMaps - No image

Post by velden »

"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... ggm_map.js"
jquery...._map.js
"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... tooltip.js"
map_tooltip.js
"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... _packed.js"
infobox_packed.js
"NetworkError: 404 Not Found - http://diwana.co.uk/tmp/cache/cgecrf_4b ... 30673740e/"
/tmp/ca...73740e/
"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... _packed.js"
infobox_packed.js
"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... tooltip.js"
map_tooltip.js
"NetworkError: 404 Not Found - http://diwana.co.uk/dev/modules/CGGoogl ... ggm_map.js"
jquery...._map.js
"NetworkError: 404 Not Found - http://diwana.co.uk/tmp/cache/cgecrf_4b ... 30673740e/"
/tmp/ca...73740e/
Google Maps API warning: NoApiKeys https://developers.google.com/maps/docu ... o-api-keys
util.js (line 220)
Google Maps API warning: SensorNotRequired https://developers.google.com/maps/docu ... t-required
util.js (line 220
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

All these errors come from Calguys Google Maps 2, which is a clean install. 'Fresh out the box' . I have not touched it. I was having trouble with that yesterday ( see other thread )

As CGStaticMaps, is not dependant on that module, I have removed the js associated with it.

Still no joy though.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

I am still haveing trouble with this. Could anyone advise ?
I can't seem to get the extension to output.

Without format=''

Code: Select all

 {CGStaticMaps address='Paris FR' center='Paris FR' marker0='Paris FR' zoom=12 markercolor='#efefef' size='250x250' alt="A map of Paris, France" }
No image displayed.

Output is :-

Code: Select all

 <img id="" class="" alt="A map of Paris, France" width="" height="" src="http://diwana.co.uk/tmp/cache/cgecrf_5dbc28dd6ab64ced6583ab87ae8a4428"/>
Also note that the

Code: Select all

size='250x250' 
does NOT seem to be having any effect.

With format=PNG or format='PNG' or format='png'
{CGStaticMaps address='Paris FR' center='Paris FR' marker0='Paris FR' zoom=12 markercolor='#efefef' size='250x250' alt="A map of Paris, France" format=PNG}
I get an error :-

Code: Select all

PNG is an invalid format for CGStaticMaps\map_generator
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: CGStaticMaps - No image

Post by PinkElephant »

Looking at 2.1.2 with CGStaticMaps 1.0.0 +(CGExtensions 1.52.2, CGSimpleSmarty 2.0.5), I can't reproduce the javascript errors and in the absence of full sysinfo this may or may not be relevant...

Code: Select all

{CGStaticMaps address='Paris FR' center='Paris FR'}
... successfully creates a png file in the cache directory;

Code: Select all

$config['tmp_cache_location']       = '/srv/example.com/public/private/cmsms/tmp/cache';
However, img src assumes the default tmp/cache location;

Code: Select all

<img id="" class="" alt="Paris FR" src="https://www.example.com/tmp/cache/cgecrf_b1e8aa2120810f4365f90d39453c612f" height="" width="">
... and will 404 as cgecrf_b1e8aa2120810f4365f90d39453c612f lives in the non world-readable location set in config.php

Line 37 of modules/CGStaticMaps/lib/class.saved_static_map.php shows

Code: Select all

$url = $sysconfig['root_url'].'/tmp/cache/'.basename($crf->get_dest());
I guess a fix might involve a module specific location, say, uploads/_CGStaticMaps
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

Thanks for your help.
I have eliminated ALL Javascript errors, so that can be discounted.

So, just using :-

Code: Select all

{CGStaticMaps address='Paris FR' center='Paris FR'}
, as you did, I get the same error :-

Code: Select all

"NetworkError: 404 Not Found - http://www.diwana.co.uk/tmp/cache/cgecrf_b1e8aa2120810f4365f90d39453c612f/"
I looked in the cache and The file IS being created in the correct place, but WITHOUT the extension ( .png ). I can go and add it in manually, and it works.

Any idea what may be causing this ?

I am getting this PHP error :-

Code: Select all

PHP Warning:  Parameter address is not known by module CGStaticMaps dropped in /home/.../public_html/lib/classes/class.CMSModule.php on line 652
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGStaticMaps - No image

Post by calguy1000 »

I ran some tests today and was never able to reproduce this problem exactly. I was always able to produce a map. The bug reported mentioned something about marker colors once I change the marker color to the obvious color everything worked fine it seems to me that the marker color itself was too great to be easily visible.

Either way I did make some very minor fixes to the module and I will release a new version hopefully this weekend
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

Ok Robert. Thanks for taking the time to investigate.

On my latest test, I used a very basic/ default declaration ( not involvimg marker colour ), but still no file extension / no joy.

Is there any particular PHP settings in my particular setup, that you can think of, that could be causing this ?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGStaticMaps - No image

Post by velden »

PinkElephant wrote: ...

Code: Select all

$config['tmp_cache_location']       = '/srv/example.com/public/private/cmsms/tmp/cache';
However, img src assumes the default tmp/cache location;

Code: Select all

<img id="" class="" alt="Paris FR" src="https://www.example.com/tmp/cache/cgecrf_b1e8aa2120810f4365f90d39453c612f" height="" width="">
... and will 404 as cgecrf_b1e8aa2120810f4365f90d39453c612f lives in the non world-readable location set in config.php
That location is/must be world-readable. E.g. combined css files are stored there and called directly by browser.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

Thanks.

Please excuse my ignorance, but do I have to change/ declare that path in the config file itself ?

Thanks guys
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGStaticMaps - No image

Post by velden »

No, by default you don't.

Strange thing is that the module does output the path
http://diwana.co.uk/tmp/cache/cgecrf_b1e8aa2120810f4365f90d39453c612f

But the file doesn't seem to exist (please check).
I guess though that if folder permissions are bad, the whole CMSMS install wouldn't work.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: CGStaticMaps - No image

Post by naturelab »

Hi, It DOES exist, but it doesn't have the file extension, that's why it doesn't display.

Specifically declaring the 'format' does not work ( see errors above )

That's why I ignored the previous suggestion about the location / path odf the cache.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGStaticMaps - No image

Post by velden »

So, you're saying the file 'cgecrf_b1e8aa2120810f4365f90d39453c612f' does exist. It has NO file extension.

So, why doesn't your web server serve the file? Something in the configuration preventing it from serving files without extension? (.htaccess?)
Post Reply

Return to “The Lounge”