Silverstripe version not showing & Google API Key Change from v2 to v3

Silverstripe Version: - UNKOWN - will not display on CMS

Silverstripe version not showing in CMS & Google MAps API key update

Hey everybody, have recently jumped on-board with a new company as a media person - have done a bit of dev in the past and trying to help them sort this out.

Firstly, the CMS shows Version: Unknown - is there any way to find out the current SS version they are using & is it possible to upgrade the CMS without a developer or will it break everything?

More importantly, Google Maps has closed the old v2 and the new v3 needs a new API key. I can generate the key etc, then as I understand it I need a web server to modify the page code. My question would be, can I just replace the below code with the suggested from the Google Developers are (with our new API key) or does somebody have to re-write all of that code because of the v2 to v3 introduction of the google.maps namespace.

Any help (even if it confuses me more) would be much appreciated.

<script src="//maps.googleapis.com/maps/api/js?sensor=true&callback=google_maps_loaded"></script

is there any way to find out the current SS version they are using

If there is a composer.lock file in the project root you should be able to see the version of SilverStripe in use. Otherwise a composer.json file of present should indicate the approximate version. If neither of those are present post a screenshot of the CMS, we’ll be able to tell you the major version from the UI and may have an idea of the minor version too.

…can I just replace the below code with the suggested from the Google Developers are (with our new API key) or does somebody have to re-write all of that code because of the v2 to v3 introduction of the google.maps namespace.

Getting a new API key most likely won’t be enough, the major version bump from 2 to 3 indicates there are non-backwards-compatible changes. The module would have to be updated to a version that uses the V3 API (assuming you’re using a module, and an updated version is available) and possibly some user code would have to be updated too.

1 Like

@JonoM - Thank you kindly for your response. Sounds like a bit of fun getting it to work again.

This may be a seemingly silly question, please forgive me - I’ve jumped into a project built years ago by somebody else and I’m trying to locate any of the original project files, all the templates/themes that allow the CMS content duplication etc - so that I can see the Contact Page code that I’m going to try to work with, to see if I am way out of my depth or not (probably! :wink: ) - is there another part of SilverStripe where I can log in to see all the stuff loaded up currently so I have some idea what I’m trying to adapt? As far as I can work out, it’s not a module, so it would have to be removed and put in as an updated module or updated code.

I have attached an image of the Dashboard of the SS CMS we are using in the hopes somebody might be able to tell me what version we are currently using, that might start me somewhere.

Also, not sure if this might help?

It’s definitely SilverStripe 3 but not sure what minor version. You probably need a developer to safely upgrade the site to the latest 3.x version, and definitely if you want to go to version 4. But if you’ve done some development in the past you might be fine! Either way, you should back up the project and clone it locally, and try out your changes locally first so you don’t risk hurting the live site. You should also track any changes you make with source control (most people use git) in case you need to roll back any changes later.

If you know the map is on the contact page, the first thing to do is check the type of page in the CMS. If it’s called ‘ContactPage’ then you want to find a file called ‘ContactPage.php’ in your project code (do a file search by name in the Finder/Explorer to find it). You may find all the relevant code in there, but there may also be 1 or 2 template files called ContactPage.ss (and possibly some include template files) as well that are relevant.

Hope that helps a little, and feel free to ask more questions. But if it all gets too much and you want to hire a dev to update the site (and perhaps compile some documentation to reference in the future, and get your project under source control) feel free to send me a DM, or you could enquire on the Slack channel or look through the Developer Directory for someone to help you :slightly_smiling_face: