November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hmm, it should work with Episerver 11 and we use it and it works.
When it says that it can not find the file I would look and see that the files below modules/_protected for it has been included and then try to reinstall it:
update-package Episerver.GoogleMapsEditor -reinstall
But I see now that we do not use it that way. We use it like this:
[ClientEditor(ClientEditingClass = "googlemapseditor/Editor")]
[Display(GroupName = SystemTabNames.Content, Order = 1040)]
public virtual CoordinatesBlock Location { get; set; }
So the last example you show should be correct.
Maybe @ted could help
Looking in the modules/_protected folder it seems correct:
And we have other addons like DBLocalizationProvider, Geta.Epi.FontThumbnail installed and working.
Tried reinstalling it with same issue
Comparing with AlloyDemoKit (web.config settings etc.) I see no difference
Make sure you dump references of the old way for referring to this Nuget and download the latest and make sure you register the API-key for your Google API as Ted describes below:
https://tedgustaf.com/blog/2018/episerver-google-maps-editor-update/
Hopefulle this will resolve your issues
What do you mean by dumping references of the old way? I just installed this addon to the project and haven't had any old version of it in the project before. I have also created a custom descriptor for it with our own apikey (not listed below ;) )
[EditorDescriptorRegistration(TargetType = typeof(IGoogleMapsCoordinates), UIHint = UIHint, EditorDescriptorBehavior = EditorDescriptorBehavior.OverrideDefault)]
[EditorDescriptorRegistration(TargetType = typeof(string), UIHint = UIHint, EditorDescriptorBehavior = EditorDescriptorBehavior.OverrideDefault)]
public class SiteGoogleMapsEditorDescriptor : GoogleMapsEditorDescriptorBase
{
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
{
base.ModifyMetadata(metadata, attributes);
// API key for the Google Maps JavaScript API
metadata.EditorConfiguration["apiKey"] = "nnnnnnnnnnnnn";
// Default zoom level from 1 (least) to 20 (most)
metadata.EditorConfiguration["defaultZoom"] = 5;
// Default coordinates when no property value is set
metadata.EditorConfiguration["defaultCoordinates"] = new { latitude = 57.781958, longitude = 14.231367 };
}
}
Regarding that editor update blog post I see Waldis has made a rather cryptic comment about it, wonder if it has anything to do with that code example being wrong or something that might cause this issue.
An alternate solution may be this: https://hacksbyme.net/2017/08/15/a-super-simple-geo-coordinates-property-for-episerver/
I just had the same issue, and had to manually add the editor to protectedModules in web.config:
<configuration>
...
<episerver.shell>
...
<protectedModules rootPath="...">
<add name="EPiServer.XForms" />
<add name="EPiServer.VisitorGroupsCriteriaPack" />
<add name="EPiServer.Cms.TinyMce" />
<add name="Geta.SEO.Sitemaps" />
<add name="Shell" />
<add name="CMS" />
<add name="Find">
...
<add name="TedGustaf.Episerver.GoogleMapsEditor" />
Hi Tobias,
You could see the error in detail by adding the following tag <clientResources debug="true" /> to your web.config inside the episerver.framework element.
After that, you can easily find the root cause of the problem.
I've got the same issue when trying to integrate this custom property to our customer website.
But I believe that your case is not as easy as mine.
So please share your browser console log after add "clientResources" as I mentioned to your web.config file.
I'm happy to investigate the issue.
Thanks, COVID! I've so much free time :D
I'm having issues adding the GoogleMapsEditor https://nuget.episerver.com/package?id=EPiServer.GoogleMapsEditor
I have a local block
If I understand it correctly the editor should automatically be added to propertyes having a type inheriting from this class so this would work?
However it doesn't. In the editor mode the block is added with just two basic input fields like a regular block.
Adding either of these attributes result in the same behaviour:
But, adding this attribute result in an error in edit mode stating that /EPiServer/Shell/11.17.0/ClientResources/googlemapseditor/Editor.js is not found
What is the correct way to get this to work? TargetFramework 4.6.2, Epi version 11.11.3