0
Welcome Guest! Login
0 items Join Now

SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

  • SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 6 months ago
    • Hi,

      I have to admit I'm grasping at straws here, but I suddenly have a problem with Google Maps satellite imagery in every Gantry 4 site I have, but it doesn't show up in a Gantry 5 site. They all use Joomla 3.10.2 and the same map extension. Actually, two different map extensions give me the same error in Gantry 4 but not in Gantry 5. That's circumstantial evidence, but it's all I have to go on.

      The problem is that the map shows an overlay that says "sorry, we have no imagery here". The console throws this javascript warning:
      util.js:formatted:7424 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

      I've asked Google for help, with no reply. The cited documentation isn't any help to a novice. I do have a Version 3 key, and that key works with Gantry 5 sites. Could you please take a quick look for me and see if you can give me a lead? I'll supply links in the Secure section.

      Thanks so much!
      Kip
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • 1. Gantry 4 uses the old analytics.js code and doesn't support the modern analytics functions. Gantry 5 does use the modern gtag.js code which does.

      2. You seem to have analytics.js loaded twice in your page? So that suggest to me that you have the google analytics turned on in template manager AND have loaded this yourself too (or with a third-party product).

      3. If you want to use the modern gtag.js then I suggest that you turn off the analytics in template manager and instead load the code yourself (use a third-party product that code load scripts dynamically rather than modifying our template code e.g. "headtag" on JED).

      Regards, Mark.
    • Last Edit: 2 years 5 months ago by MrT.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • Thanks, Mark. Sorry in advance for the confusion below.

      I disabled Google Analytics in the Gantry 4 site to no effect. I use the same two mapping extensions in the Gantry 4 and Gantry 5 sites, and the same Google Maps API key I received in 2016. Yet satellite imagery works in the Gantry 5 sites but not the Gantry 4 sites.

      Here's my confusion: does the version of Google Analytics you're using (gtag.js vs. analytics.js) affect how Google maps are displayed? I really wasn't trying to upgrade to Google Analytics 4 ... at least not on purpose.

      Should I still try to install an extension that manages the new version of Google Analytics in the Gantry 4 sites to hopefully get the maps to work the way they do in the Gantry 5 sites?

      Thanks for your help! I always learn something from you, albeit too slowly, that pays other dividends later.

      Kip
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • If you turn off analytics in Gantry 4 then it would not load analytics.js - your site is loading it, so either you are loading it yourself or you did not turn in all the templates that you are using.

      The Gantry 4 site is showing an error in the browser console to do with the analytics.js and mootools (which some of our very old extensions use). Mootools can often conflict with jQuery unless the program using jQuery has been written that well.

      You may also not be aware that Zephyr is a legacy template that we no longer support. Also, RT doesn't provide support for third-party products (of which you seem to be using several).

      So what can you do?

      1. Check your template settings in each template again to make sure analytics are turned off.
      2. Try disabling your other third-party products one at a time - clearing browser and server cache between each change. These are the other ones I can see loaded (JCE, "attachements", widgetkit, sh404sef). Basically that JS error has got to be eliminated for the map to work. You're also using rokstories (which we no longer support).
      3. Contact the developer of that map extension to see if they can help.

      As a general point to, please be aware that Gantry 4 is never going to be made to work with Joomla 4 (it will carry on working with J3.10.x for a further two year though). So, at some point, you should consider using a new template and Gantry 5 (which will require you to redevelop your site as there is no upgrade path).

      Regards, Mark.
    • The following users have thanked you: quantumgravity

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • Mark,

      Thanks for taking the time to write such a great answer.

      I've since learned that if MooTools-core.js and MooTools-more.js are disabled, it fixes the issue. Another JS warning states that: "This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly." Removing those files apparently gets rid of the "Array.from" issue.

      But those files are needed by something, so I guess I'll have to go through the process you described to find out what it is. One of the newer Gantry 4 sites with this problem has very few third-party extensions, so I'll start with it.

      Thanks, too, for the warning about Gantry 4 and Joomla 4. I actually didn't know that, so it sounds like I have a lot of work ahead of me before the two years runs out.

      If anything about the above leads to another tip, please let me know. I really appreciate you going above and beyond (as usual) giving me leads on this issue. It's frustrating.

      Take care,
      Kip
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • Ok so it is a clash between Mootools (used by the very old RT extensions) and jQuery (used by your third-party programs). If you disable Mootools then the RT extensions will cease to function so you'll need to find alternates to those that don't use Mootools. The alternative would be to disable the third-party programs instead (as I described).

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • Thanks, Mark--

      OK, I cloned the simplest Gantry 4 site to another domain and sequentially disabled nearly everything.

      This is the only way I can get the satellite imagery to work:
      1. Use Protostar as the default template, and
      2. Disable RokBox.

      If I disable RokBox but switch back to rt_ionosphere-responsive, the satellite imagery again fails.

      In fact, if I disable everything with "Rok" in the title but still use Ionosphere as the default template, the satellite imagery fails.

      Do you think there's any way out of this, then?

      Thanks!

      Kip
    • Last Edit: 2 years 5 months ago by quantumgravity.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • Gantry 4 and our RT extensions use a very old version of MooTools that we cannot change. As the message states...
      This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.

      ... and it is MooTools that is implementing that override. Therefore that google map API v3 is not going to work as long as MooTools is loaded. To prevent that happening you your need to disable all RT extensions and probobably turn off some other options in the template (those that might cause mootools to be loaded eg "fixed footer") - this would include Roknavmenu, rokbox, rokstories, etc. Once you've done that there's not going to be a lot left and perhaps this may be the thing that leads you to conclude that you should use a new template.

      Gantry 5 and it's templates use jQuery rather than Mootools as do it's particles (which replace many of the RT extensions). Gantry 4 has not been further developed for a long time now - all the development effort has gone into Gantry 5.

      So, sorry, I don't think I can help any further. If you want to use modern software (like google api v3) then perhaps the time has come to move on to a modern framework and theme.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Map Behavior in Gantry 4 vs Gantry 5

    Posted 2 years 5 months ago
    • That’s a perfect ending; it does sum it up.

      I have to say that Rockettheme’s support in general, and yours in particular, has always been exemplary. I’ve enjoyed using the company’s templates and imaginative extensions a great deal. But for my own sanity, I need to leave the uneducated impressions of a non-technical customer that arise from this situation:
      1. Google Maps API v3 has been around since 2009, and my v3 key has been unchanged since 2016. I don’t think my desire to use “advanced software” is the cause of this problem. But Google is evolving while Gantry 4 deliberately isn’t (as you noted), which leads to situations like this.
      2. Since this happened simultaneously to all of our Gantry 4 websites, a huge percentage of Rockettheme's Gantry 4 installed base that render Google maps must be experiencing this problem.
      3. I’ve only developed one Gantry 5 site. While it certainly works, it feels to me like it’s supplanting and overriding Joomla’s core functions in many ways. It makes me think of Gantry 5 as a separate entity rather than a seamless resident of the Joomla ecosystem.
      4. While everything eventually faces technical obsolescence, I can’t help but wonder if the Gantry 5 path was a good idea. A user like me would be better off to use a templating system that kept evolving its core framework in an upgradable way rather than abandoning what it had and leaving an embedded base of marooned customers. It seems like there are good reasons to have any CMS-resident framework remain dependent on the core functionality of the CMS, too. I’m sure there were good technical reasons for this decision, and I’m not sure if anyone else in the templating world adopted a different approach. But I think some did.
      5. The migration to Joomla 4 must be a horrible headache for Rockettheme and other large providers of extensions. But since the company is abandoning many of its Joomla customers’ favorite extensions, at least in the short term, and giving its presumably large Gantry 4 base no upgrade path to Joomla 4, it makes you wonder about Rockettheme’s commitment to Joomla in general. I wouldn’t be surprised if Wordpress is creating much more business volume now, and I’m unsure about Grav.
      6. As much as I’ve liked Rockettheme, it might be time for people like me to shop around as we face Joomla 4. Maybe I, too, should consider moving to Wordpress as much as I'd hate to do it. I probably won’t unless it feels like the developer community is slowly abandoning Joomla.

      I hope you don’t mind some feedback from a small but long-time customer. It’s not criticism; it’s a brow-furrowing chain of thought. I may be wrong about most of the above, but it doesn’t hurt for one of my favorite technical vendors to know what at least one non-technical customer is trying to think through. No answer is expected; you've already been terrific about putting up with this thread.

      Best regards,
      Kip
    • Last Edit: 2 years 5 months ago by quantumgravity.

Time to create page: 0.044 seconds