Problem WPG2 + Google Maps
BorgKing
Joined: 2002-09-12
Posts: 314 |
Posted: Fri, 2008-02-22 20:39 |
Hello, I'm having a problem with the combination of WPG2 and the Gallery2 Google Maps plugin. When I use Gallery2 standalone the plugin is not giving any problems, so therefore I hope you may have an answer. The problem seems to be that the Gallery2 Google Maps plugin does not have enough memory available. I have the php memory limit set to 128MB, but even boosting it to 512MB did not resolve the issue. The problem only occurs when I want to view the map of an album with subalbums totalling over 200 items with GPS information. I hope you have any clue as to what might be the problem here. The topic in the Third Party Modules Support forum is here. Thanks in advance! Correct Google Map WordPress version = 2.3.3 |
|
Posts: 1378
Hmmm I never really played around with the Google Maps third party plugin to get any understanding on how it works.. From the looks of how the page is being rendered, you can rule out memory, as you can clearly see your Wordpress Footer, something you would not see if you ran out of php memory..
The fact your first link works via the WPG2 page would indicate to me that the WPG2 page is correctly showing the G2 content thus I suspect is the JS error I am getting when accessing the second link (see below) is the issue.
"myWidth is not defined - document.write('<div id="map" class="themap" style="overflow:hidden;width:'+myWi..."
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 314
Well, I'm getting the JavaScript error because the Google Maps plugin is crashing somewhere and therefore not putting the JavaScript in the html header. Problem is that without WPG2 the Google Map works fine (also the large maps), but also with WPG2 and <200 items in my album, the page works fine. So it's really hard to put my finger on the problem. Standalone, I have no problems with WPG2 and the Google Maps plugin. But put together with a large album, things break.
Posts: 4
Im having the same problem with some of my Gallery2 album in combination with Joomla (1.0.15) running the g2bridge plugin.
twice the javascript error -myWidth is not defined-
Both lines are generated by ShopMap.tpl
But the Map stops loading after generating /gallery2/modules/map/GoogleMap.js
from MapHeader.tpl and refuses to load the rest of MapHeader.tpl
Albums that contain less the 100 photo-items works ok as well when I wanna see the map out of the Joomla environment.
Working link (out of the Joomla environment)
Non working (in Joomla)
Working Map in Joomla
I raised the php-memory settings, but still without any success.
Im looking forward to the a working solution.
Joshua
Gallery versie = 2.2.4 core 1.2.0.6
PHP versie = 5.2.6 apache2handler
Web server = Apache/2.2.3
Database = mysql 5.0.51, lock.system=flock
GoogleMap module 0.5.6
G2Bridge 2.0.14
Joomla 1.0.15
Posts: 1378
Hiya joshua28,
You might want to post this issue over in the Joomla support forum as this forum is for the WPG2 plugin..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 4
Hi
As I posted this same problem in the Joomla forum and didnt get any response over there I'm trying it here again. To me it sound like the same problem we have here. I am wondering if you do allready know what caused this problem in WPG? It might be same problem which causes it in Joomla.
Btw when I put the gallery in debug mode I can load every album on a map without an error within Joomla.
Joshua
Posts: 1378
joshua28,
Try a little experiment, and switch the WPG2 Output to a Blank (NON Wordpress Page) which you can do in WPG2 3.05+ validation page, answer NO to Should Gallery2 Page(s) look like a Wordpress Page
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 77
Hi,
Any news about this? I got the same problem with joomla integration, you can look it at http://picturevolution.com/photos-anciennes/?g2_view=map.ShowMap. With php5, the map work fine if I activate gallery2 debug mode. With php4 all is OK but I need to use PHP5... On my local server (php5) same problem (don't work)... I don't understand what happen...
Always have this
Erreur : myWidth is not defined
Fichier Source : http://picturevolution.com/photos-anciennes/?g2_view=map.ShowMap
Ligne : 240
Ledom
Posts: 314
I actually just did this, and it had no effect at all. I still cannot see the map when the number of items goes above 200 or so.
Using WordPress 2.6.2, Gallery 2.2.6, WPG2 3.0.7 and Gallery2 Google Maps plugin 0.5.8.
Posts: 39
Hi Guys,
Same problem as you, I have an error on big maps :
Erreur : omap is null
Fichier Source : http://www.arnoult.com/index.php?option=com_g2bridge&view=gallery&Itemid=55&g2_view=map.ShowMap&g2_Mode=Normal&g2_Group=&g2_album=2008
Ligne : 235
My config is with joomla 1.5.7 + map module 0.5.8 + bridge 2.1 :
Gallery version = 2.2.6 noyau 1.2.0.8
PHP version = 5.2.0-8+etch11 apache2handler
Serveur Web = Apache/2.2.3 (Debian) DAV/2 PHP/5.2.0-8+etch11
Base de données = mysql 5.0.32-Debian_7etch6-log, lock.system=flock
Boîtes à outils = NetPBM, Exif, ImageMagick, Ffmpeg, SquareThumb, Gd, jpegtran, Thumbnail
Accélération = none/21600, none/21600
Système d'exploitation = Linux petitbeurre 2.6.18-6-686 #1 SMP Mon Aug 18 08:42:39 UTC 2008 i686
Thème par défaut = matrix
gettext = activé
Langage = fr_FR
Navigateur Web = Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Lignes dans la table GalleryAccessMap = 91
Lignes dans la table GalleryAccessSubscriberMap = 13054
Lignes dans la table GalleryUser = 29
Lignes dans la table GalleryItem = 13051
Lignes dans la table GalleryAlbumItem = 149
Lignes dans la table GalleryCacheMap = 0
If you have any info that would solve the problem...
Thanks
Posts: 35
I recall similar problems when using wpg2 and google maps G2 plug in, it was 12 months ago though.
I think my problem was to do with the API key not matching the domain. G2 was loading in www and I was not using www. for wp or something like that.
Check that your API key is for the domain, check things like www and/or directory or sub domain changes between G2 and WP installs.
Posts: 77
Hi, don't think it is a API key problem or API is php dependent
I got the same problem, map works good standalone, good with php4, don't work with php5
for me too... (only with php5 and embedded)
Posts: 27300
MapHeader.tpl....try to remove
<!-- This is mostly boilerplate code from Google. See: http://www.google.com/apis/maps/documentation/ -->
and see if that helps. Just guessing.Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 77
Please look at http://gallery.menalto.com/node/81796#comment-289794
The problem seems to be linked with createmarker loop
And is dependent of item number...
memory?
execution time?
other...?
Posts: 508
I'm the (current) maintainer of the Google Map module. Usually when I see the "myWidth" error, it's because of some PHP error in ShowMap.inc. In this case, I would hazard a guess that the semantics of a PHP function changed from PHP4 to PHP5 (like the restrictions on a function parameter became tighter). What happens if you turn on PHP error display (you should be able to do this in config.php)?
I'm aware that the map module is in a pretty sorry state. A lot of the functionality was implemented in a way that is not in the style of Gallery2 and does not make good use of the G2 API, so things are brittle and break easily, as this problem demonstrates. I'm just coming back to working on the module after quite a while off, and I'm working on overhauling the entire module, but there's a lot of stuff to fix and it's slow going.
I'll take follow-up replies in the third-party plugins forum, on this thread.
Posts: 508
Oops, pointed you to the wrong forum. Let's continue discussion at this thread in the 3rd Party plugins forum instead.
Posts: 2
Same problem here, using latest Map Module (0.5.8).
In gallery2 everything works like a charm, but the Joomla integration (in my case) using G2Brigde doesn't work.
First I was thinking it was related to the Google Maps API key, but I'm not sure if that's related.
If I'm correct, Google Maps API keys hold for a complete domain, including sub-dirs.
Only difference is everything basically before the first slash.
So "http://domain.org" is similar to "http://domain.org/gallery", but different from "http://www.domain.org".
So, the maps work fine in Gallery2 itself. However, the strange thing is that in the Joomla integration (using Gallery2 embedded), it DOES work fine for some albums, but not for all! Very strange, and I'm not much further with debugging.
If I find something, keep you posted!
Cheers, Rob
Posts: 2
The 'myWidth' errors come from:
gallery/modules/map/templates/blocks/Thumb.tpl
gallery/modules/map/templates/ShowMap.tpl
gallery/modules/map/templates/MapHeader.tpl
However, fixing these errors does not solve the problem.
They map and thumbnail boxes now appear, but remain emtpy...
I think the issue is a bit more indepth...
For me, the maps work on two albums and do not work on one album.
Both the working and non-working, contain images with and without annotations.
On of the working albums has some images without GPS info, so that's not the problem.
Possible the $map object is not correctly created before sending to the displaying functions.
Does anyyone have more ideas regarding this issue?