Ask a Question

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."

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?

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?

JPList filter by Date picker input

Hi, We use Web Api to load data, where it have StartDate & EndDate field. By default it load all data, and allowing users to filter by StartDate & EndDate. We've been struggle on how to use the Input filter for Date. Have tried couple thing, also tried to use jQuery-UI Date picker, but it's still not working: ``` <input data-path=".StartDate" type="date" value="" data-datepicker-func="datepicker" data-datetime-format="{month}-{day}-{year}" data-control-type="date-picker-filter" data-control-name="StartDate" data-control-action="filter" /> ``` Is there a sample of how to Filter by date?

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?

Handlebar helper Truncate Text?

Has anyone succeeded in using an handlebar helper that converts a full html description into a truncated plain text description? The only thing I could find is the truncate helper: Handlebars.registerHelper ('truncate', function (str, len) &#123; if (str && str.length > len && str.length > 0) &#123; var new_str = str + " "; new_str = str.substr (0, len); new_str = str.substr (0, new_str.lastIndexOf(" ")); new_str = (new_str.length > 0) ? new_str : str.substr (0, len); return new Handlebars.SafeString ( new_str +'...' ); &#125; return str; &#125;);

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?

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 } } }

OpenContent and DNN Site Export/Import

Hello, I've found OpenContent does not appear to work correctly with the Import/Export functionality in DNN 9.2 (PersonaBar, Settings, Import / Export). When I run an import into a blank site (where OpenContent is installed) none of the OpenContent data is imported - all of my modules are blank. Is this behaviour expected (i.e. it's a limitation of the DNN Import/Export functionality) or a bug? Many thanks, Olly Hodgson.

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?