Discussions

Ask a Question
ANSWERED

Where to enter Google Maps API Key?

It probably is documented somewhere, but I'm not finding any doc for the Maps module. Specifically I'm not sure where to enter my Maps API key, and if there's anything else that needs be done. I don't see a place to enter this in the Template Settings dialog either. After installing the module, I get the following error: "Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details." The console has: "Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys" util.js:209:33 "Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error" Here's where to get an Google Maps API key: https://developers.google.com/maps/documentation/javascript/get-api-key Oh maybe one follows instructions at: http://webdesign.about.com/od/javascript/ss/add-google-maps-to-a-web-page.htm#showall which says: "First, Add the Map Script to the <head> of Your Document Open your web page and add the following to the HEAD of your document. <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=SET_TO_TRUE_OR_FALSE"> </script> Change the highlighted items to your API key, which you got in step one of this article. And change the sensor to TRUE if the web page is using an automated sensor, such as a GPS locator, to find the map location, or FALSE if you're pasting it in manually."
ANSWERED

Lucene.net issue prevents adding or editing content

Hello, We're using DNN Evoq Engage 9.2.0 with OpenContent 3.5.4, hosted on an Azure App Service. It's been fine for months. Suddeny today we're unable to to add or edit content on any of our OpenContent modules. Pressing Save brings up an alert box: *Uh-oh, something broke: Internal Server Error*. The admin logs show: ``` Referer: https://[my website]/My-Services/ctl/EditQuery/mid/406?popUp=true InnerMessage:An unexpected network error occurred. InnerStackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count) at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.BinaryReader.Read(Byte[] buffer, Int32 index, Int32 count) at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len, Boolean useBuffer) at Lucene.Net.Index.SegmentReader.Norm.Bytes() at Lucene.Net.Index.SegmentReader.GetNorms(String field) at Lucene.Net.Index.SegmentReader.Norms(String field) at Lucene.Net.Search.TermQuery.TermWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer) at Lucene.Net.Search.BooleanQuery.BooleanWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer) at Lucene.Net.Search.QueryWrapperFilter.AnonymousClassDocIdSet.Iterator() at Lucene.Net.Search.IndexSearcher.SearchWithFilter(IndexReader reader, Weight weight, Filter filter, Collector collector) at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector) at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields) at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort) at Lucene.Net.Search.Searcher.Search(Query query, Filter filter, Int32 n, Sort sort) at Lucene.Net.Search.JsonSearchUtils.Search(Searcher searcher, String type, Query query, Query filter, Int32 numResults, Sort sort) at Satrabel.OpenContent.Components.Lucene.LuceneController.Search(String type, Query filter, Query query, Sort sort, Int32 pageSize, Int32 pageIndex) at Satrabel.OpenContent.Components.Datasource.OpenContentDataSource.GetAll(DataSourceContext context, Select selectQuery) at Satrabel.OpenContent.Components.Render.RenderEngine.GetDataList(RenderInfo info, OpenContentSettings settings, Boolean clientSide) at Satrabel.OpenContent.Components.Render.RenderEngine.Render(Page page) at Satrabel.OpenContent.View.OnLoad(EventArgs e) ``` When I open Filter Settings, and click Reindex Module, the page reloads with a "Critical Error Occurred" box and there is another Lucene error in the Admin Logs. This suggests the Lucene index files are locked or broken. Looking in the log file on the App Service, I can see `D:\home\site\wwwroot\App_Data\Search\write.lock` is in use. I know that's part of DNN search, not OpenContent. But is also uses Lucene, so is it likely to be a related issue? https://github.com/dnnsoftware/Dnn.Platform/issues/2231 points to a similar issue in DNN itself. We're trying a restart of the App Service to see if it fixes the issue. Is this something you have run into before?
ANSWERED

Customizing CKEditor, json...isn't

I'm trying to customize my CKEditor, and it shows how to customize here: https://opencontent.readme.io/docs/field-types#section-rich-text-with-ckeditor Only that's not json, and the editor won't save it. MISSING { "Text" : { "type":"ckeditor", "configset":"basic", "ckeditor":{ "stylesSet" : { MISSING NAME { "name": "Title small", "element": "h2", "attributes": { "class": "h4" } }, MISSING NAME { "name": "Note", "element": "span", "attributes": { "class": "note" } } } } } MISSING } What kind of format is this? I presume this goes in Form > Options?
ANSWERED

Handlebar helper in detail view?

I added a Handlebar helper: Handlebars.registerHelper('if_eq', function(a, b, block) { if(a == b) return block.fn(this); }); which I called in the item.hbs: {{#if_eq btw "geen"}}0% btw{{/if_eq}} This works fine in the item view, but doesn't work in detail view. Probably because the template.hbs isn't called? I tried adding {{registerscript "handlebars-helpers.js"}} but that doesn't work... How can I get this to work?
ANSWERED

View.json - External HTML template files

Hello! I might be missing something for some reason OpenForm doesn't render my 'default-layout.html' file from view.json file. Does OpenForm support this option? Thank-you! In my view.json file I have { "layout": { "template": 'default-layout.html' } } which has the following markup <div class="row"> <div class="col-md-12" data-alpaca-layout-binding="Name"></div> <div class="col-md-12" data-alpaca-layout-binding="Email"></div> <div class="col-md-12" data-alpaca-layout-binding="Phone"></div> <div class="col-md-12" data-alpaca-layout-binding="Message"></div> </div> and my schema.json file has { "title": "Contact Us", "type": "object", "properties": { "Name": { "title": "Full Name", "type": "string" }, "Email": { "title": "Email Address", "type": "string", "required": true }, "Phone": { "title": "Phone Number", "type": "string", "required": true }, "Message": { "title": "Your Message", "type": "string", "required": true } } }
ANSWERED

How to configure the RSS.hbs

I've a variant on the article template and tried to generate the built-in RSS feed. However, it seems that the URL's will not show up in the RSS. It looks like the {{Content.DetailUrl}} and {{Context.MainUrl}} are unknown. The rss.hbs looks like: <rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <channel> <title>Copyburo</title> <link>{{Context.MainUrl}}</link> <description>RSS feed</description> <ttl>60</ttl> {{#each Items}} <item> <title>{{Title}}</title> <link>{{Context.DetailUrl}}</link> <description> <img src="{{Image.cropUrl}}" alt="" height="200"/> {{{Description}}} </description> <pubDate>{{formatDateTime publishstartdate "r"}}</pubDate> <guid>{{Context.DetailUrl}}</guid> </item> {{/each}} </channel> </rss> The output looks like this: <rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <channel> <title>Copyburo</title> <link></link> <description>RSS feed</description> <ttl>60</ttl> <item> <title>5 things I love about Holland as a South African</title> <link></link> <description> <img src="/Portals/0/Images/Thumbnails/Blogs/Main/railway_station_amsterdam-crop.jpg? ver=2018-01-06-222715-200" alt="" height="200"/> <p>I recently moved from South Africa to the Netherlands and it has been quite a journey. bla bla bla bla.</p> </description> <pubDate>Wed, 20 Dec 2017 23:00:00 GMT</pubDate> <guid></guid> </item> </channel> </rss> How do I configure the rss.hbs so both Context.MainUrl link and content.DetailUrl will show up?
ANSWERED

Error on DNN9

Hi, After I install the OpenContent 03.05.00 and added the module on one of the pages. I get this situation: Based On Template From - Web (openextensions.net) Selected , Site is disable. Template - The DropDownList is empty. Where I type some text in "New Template Name" and press on Save. I Get this Error An error has occurred. DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Satrabel.OpenContent.Components.Manifest.ManifestUtils.DataNeeded(TemplateManifest template) at Satrabel.OpenContent.TemplateInit.bSave_Click(Object sender, EventArgs e) --- End of inner exception stack trace --- Do you have a solution idea? Thanks
ANSWERED

Edit options stopped working for NonEnglish language

Hi There On my production server when I try to edit content for non-english language it opens edit dialog with no content and throws dialog with msg "Uh-oh, something broke: Internal Server Error". This is happening all across my production site. Please help me. Thanks, Anil
ANSWERED

Nested accordion not able to access @index of parent

I have a nested accordion here: https://imcw.azurewebsites.net/Programs/Mentoring/Find-a-Mentor This template: <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> {{#each Panels}} <div class="panel panel-default"> <div class="panel-heading" role="tab" id="heading{{@index}}"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{@index}}" aria-expanded="true" aria-controls="collapse{{@index}}"> {{City}}, {{State}} </a> </h4> </div> <div id="collapse{{@index}}" class="panel-collapse collapse {{#if @first}}in{{/if}}" role="tabpanel" aria-labelledby="heading{{@index}}"> <div class="panel-group" id="accordion{{@index}}" role="tablist" aria-multiselectable="true"> {{#each Mentors}} <div class="m-sm panel panel-default"> <div class="panel-heading" role="tab" id="heading{{@../index}}{{@index}}"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion{{@../index}}" href="#collapse{{@../index}}{{@index}}" aria-expanded="true" aria-controls="collapse{{@../index}}{{@index}}"> {{FirstName}} {{LastName}} </a> </h4> </div> <div id="collapse{{@../index}}{{@index}}" class="m-md panel-collapse collapse {{#if @first}}in{{/if}}" role="tabpanel" aria-labelledby="heading{{@../index}}{{@index}}"> <h5>{{Status}}</h5> {{Biography}} <a class="btn btn-primary" href="/Programs/Mentoring/Find-A-Mentor/Apply">Choose {{FirstName}}</a> </div> </div> {{/each}} </div> </div> </div> {{/each}} </div> I need to get the @index of the parent accordion to create unique identifiers for the children, but {{@../index}} always returns null. Do you have an example on nested #each loops that access the parent index?
ANSWERED

Open Content / MDesign Carousel template error

I'm new to DNN and Open Content. I installed 3.5.2. I imported the MDesign Carousel template. I get this error when I publish it. Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Alias: www.co.coos.or.us Tab: 832 - http://www.co.coos.or.us/Departments/CoosCountyFairNew.aspx Module: 6438 Called from http://www.co.coos.or.us/Default.aspx?TabID=832. Referrer: http://www.co.coos.or.us/Departments/CoosCountyFairNew.aspx. DotNetNuke.Services.Exceptions.ModuleLoadException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Satrabel.OpenContent.Components.Json.JsonUtils.JsonToDynamic(String json) at Satrabel.OpenContent.Components.Render.RenderEngine.GenerateOutputSingle(Page page, FileUri template, JToken dataJson, String settingsJson, TemplateFiles files) at Satrabel.OpenContent.Components.Render.RenderEngine.Render(Page page) at Satrabel.OpenContent.View.OnLoad(EventArgs e) --- End of inner exception stack trace ---