Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

GoogleMapDirectory

123578

Comments

  • If you started on version 0.4 then I wouldn't bother with the uninstall etc as its merely some issues for some when upgrading. I can see your error mvhaen happening with kifo's link too. So there is a common blip here, but I'll be damned if I can see what it is. Firebug is spitting this out

    Undefined property: PeopleSession::$RoleID in <b>/nfsn/content/artmgs/public/forum/extensions/GoogleMapDirectory/ajax.php on line 49

    RoleID? I only use that when setting who can access the delete button for a location. Can one of you try changing the setting in your admin and seeing if you get any different results - i'm not but then i'm not getting any errors either. I'll keep looking into it...
  • What is the recommended method to uninstall? I deleted the GoogleMapDirectory folder from the extensions directory and dropped the LUM_GoogleMapDirectory_Locations table. Yet when I installed the latest version, it already had the settings from the previous install. Where does it store the Google Key and other settings?
  • Skube, the settings are stored in vanilla's conf/settings.php file. so you should see a bunch of entries like "$Configuration['GOOGLEMAPDIRECTORY_TABNAME'] = "GoogleMapDirectory" and so on.

    I've asked on these forums a few times if there's a formal uninstall method for taking these entries back out of the settings.php file but never got an answer. This is why I set the old entries to zero and based the upgrade on whether those old ones were zero or one.

    If you want to fully uninstall, it'd be unticking the extension in the extension manager, deleting the extention from your server, delete the table in your database and then remove the entries from the conf/settings.php. If anyone out there does know the formal way to control all this, i'd love to be enlightened and I'd then happily sit and code the relevant housekeeping for this extension.

    There seems to be a key error at the moment for some where the database gets populated, but the locations don't show up. This to me means something isn't right between the server side and the client side javascript that populates the map. however seeing as its working for so many now, I'm still of the belief its to do with this convoluted upgrade/uninstall path leading to mismatches of script versions. It could also still be a wierd data character binning the javascript out but think I've pretty much solved all that.

    Of course, it may not be - its just the best I can come up with right now! Am still looking into the $RoleID error too.
  • Excellent response davidk43, thanks! I uninstalled as per your steps: unchecked extension, deleted folder, dropped table and removed all "GOOGLEMAP.." entries within the conf/settings.php. But still no go. Everything appears like it's working until I try to "Add a Location" at which point I get the following error:

    invalid flag after regular expression map.js (line 111) InitiateXmlHttpRequest() LoadData("extensions/GoogleMapDirectory/ajax.php?action=getLocations&Search=") getLocations("") getMap(500, 600, 43.647835, -79.408256, 14, "") onload(load )
    I'm wondering if those who've found it to work had a previous version installed or not. Also, I'm wondering if they can actually add locations. Maybe they see the map and think it's working?

    In any case, I don't know what else to try... oh and yeah, an standard un-install that completely removes traces of an extension would be cool. I really hate orphaned junk.
  • Hi Skube, I don't think it's a case of it working with people who had previously installed versions. I just ripped my test one completely out and whacked it back in and all fine. This error to seems to be around where I push the current users RoleID ("CurrentRoleID": "'.$Context->Session->RoleID.'") from the ajax.php/server side into the JSON object that gets passed back to the javascript/client side. I see the difference here being the various vanilla installs, rather than the extension install.

    Perhaps there's a more robust reference to RoleID, maybe $context->Session->User->RoleID ? I really don't know, these last few weeks I've been living well outside my comfort zone for coding an extension for Vanilla! I was hoping for further help but its not surfaced to date...anyone? I'll see what other references there are for the RoleID and if it works for me, get you to tweak your code, if we can get something working on both mine and yours then we've probably cracked it.
  • I'm getting this error when I try to add a location: Notice: Undefined variable: setLatitude in /usr/home/orphans/domains/orphansgang.com/public_html/forum/extensions/GoogleMapDirectory/default.php on line 184 I think it's preventing me from successfully entering in the location info.
  • Hey davidk43, you may be right. I know my installation of Vanilla was less than perfect because I attempted to port from another Forum (SMF). That said, your GoogleMap extension did work before I upgraded it. I wish I could be more help programming, but I'm a real novice. If there is anything specific you would like me to try I'm more than willing...
  • Skube, my forum was migrated from PHPBB, this seems to be the common demeanor here.
  • *bump*
  • i tried this but had to disable it

    1. the css takes over, changing the text size and font in the sidebar. i got around this by deleting the definitions H1, H2, A etc. maybe you could create specific classes for your text.

    2. clicking 'add a location' gives this error

    Notice: Undefined variable: setLatitude in /home/.lock/circuitron2/www.copsandrobbers.net/messageboard/extensions/GoogleMapDirectory/default.php on line 184 3. the page title on the maps page is not correctly set.
  • Hi circuit, all add points 1 & 3. Unfortunately point 2 is a long running mystery. I can't replicate this error, some users have suggested migrating forums might be a common cause of issue here, we're starting to suspect its vanilla setups that are causing the error not clean vanilla's with a clean extension install. I'm officially at a loss as to how to solve it and please, if anyone else out there has the inclination or knowledge either have a go at fixing or post some suggestions to what it might be on here and i'll have another go at solving.
  • thanks for the reply. this would be really useful if i could get it working.
  • Ok I´ve read this discussion one too many times. I'm having a similar problem as many others. I have a new install of Vanilla and the latest Extension, but when I add a pin to the map it doesn´t show up. I try to search for it, and it doesn't find it. Anybody figuring this out?
  • no one working on this anymore? I figure I might have a simple problem but nothing seems to work. I put pins on and they disappear. Oh well, great idea at least
  • It seems to work for me. I just tested again by adding a new location. If you want to chat, let me know. That might be a more productive way of helping.
  • When I said it worked for me, I meant with old version 0.3. I just downloaded version 0.4 and uploaded to my live forum to try and help ryanopaz. I never had the old version on my live site. All went well, but when I tried to add a location, it never appeared. I get the error as another mentioned:

    invalid flag after regular expression
    http://www.jwurster.us/Vanilla.1/extensions/GoogleMapDirectory/map.js
    Line 111

    @davidk43: I'd be happy to help you debug this and find the solution. Just let me know what to do.
  • I think I have eliminated the setLatitude error and the RoleID error. However, I still cannot see the markers I add.

    In the ajax.php file, add ",g.RoleID" to line 18 in the Select statement.

    In the default.php file, before the line:
    echo '<h1>'.$setLatitude.'</h1>';
    I inserted the line:
    $setLatitude = ForceIncomingString("Latitude", ""); //jimw
    Since I'm not sure what should be in that variable at the time, this probably won't fix the problem.

    But this is just what I've seen in my quest to help.

    Edit: I just successfully rolled back to version 0.3 on my live site, painlessly.
  • Firstly a caveat - I've never written in any of the technologies involved in Vanilla. However, there's nothing like a little determination when you really want something working! :)

    jimw - I think there may be an error in your RoleID fix. i think it should be "u.RoledID" not "g.RoleID" as, at least in my fresh 0.4 install, LUM_GoogleMapDirectory_Locations doesn't contain a RoleID column (this is the table that g maps to in the query, while u maps to the LUM_User table which DOES have a RoleID.) This sounds like the right place to retrieve the role from. BTW for anyone reading, this SELECT statement retrieves the list of locations from the database. Which brings me neatly to...

    To fix the fact that no locations are returned, you probably need to modify the query further (or at least, I did). If you run the query as written in default.php, it gives a SQL error and returns no rows - again, this may be specific to my install (I need to check my version of MySQL) but executing the query in MyAdmin I don't get any rows back and it threw a sql error. To get around this (I really have been desparate to get this thing working!!) I hacked the query in ajax.php so that it now reads:

    $Query = "SELECT
    g.LocationID,g.UserID,u.Name,u.Name AS LastEditedByName,
    g.Title,g.Category,g.Description,g.Address,g.Telephone,
    g.Link,g.Thread,g.Latitude,g.Longitude,
    u.RoleID FROM LUM_GoogleMapDirectory_Locations g,
    LUM_User u WHERE g.UserID=u.UserID ";

    NOTE I KNOW this is a good ol' fashioned hack to get the thing working! Essentially, I have removed the sub-query that provided the last-edit user name information (I think that the creator and the last editor will always be the same which, for now, is just a minor irritation - but nothing more than that). You can check that you have everything working correctly by running the following URL:

    http://YOUR.DOMAIN/extensions/GoogleMapDirectory/ajax.php?action=getLocations&Search=

    If you've got it right you get your locations list back without any errors.

    I'll spend some time on this maybe next week to see if I can get the query to run as it was intended, but until then I have 0.4 working pretty well.

    Except for one, small, irritating detail: I get the following error on the Google Map Directory page:

    uncaught exception: script.aculo.us requires the Prototype JavaScript framework >= 1.4.0

    I can see that it's the /js/scriptaculous.js that's throwing the exception but I can't figure out quite why (I have Prototype.js version 1.4.0_rc2 which is what ships with Vanilla 1.1.2). It seems to be that the Prototype object is undefined when it scriptaculous tests for it??? It feels like a clash with something else on the install but any help would be great. It doesn't seem to stop anything working but it's not pretty :(

    Apologies for a long post and very little experience in this area but hopefully it might provide some pointers as to what has been going on!
  • @paul: Thanks for catching that and your explanation. Since I have the old version working, I don't think I'll play around with the new version any more (too many other things to do).
  • Paul, that's a great piece of detective work! Apologies for my absence, I've been many miles from a computer on a sandy beach on the Med, coding has wonderfully taken a considerable back seat for a bit. As for your caveat Paul, it applies to me also and I'm amazed this plugin has got this far - the reason I haven't helped fix the bugs that are still outstanding is that I'm literally at the edge of my knowledge so can't help. It looks like you've hit on something though. So the subquery on ajax.php is kicking out an error? Let me know what version of mySql you're on, perhaps there's a more laboured join statement I can write that'll work for all versions of mySql, though that subquery looked pretty standard to me. This kind of returns to my very first request when posting version 0.1 for someone to help write all the queries for SQLBuilder in Vanilla so its truly compatible...
Sign In or Register to comment.