adaptlearning / adapt_authoring

A server-based user interface for authoring eLearning courses using the Adapt framework.
https://www.adaptlearning.org/
GNU General Public License v3.0
513 stars 278 forks source link

Grunt task failure for Site Preview after new install #2647

Open ScottMRafferty opened 1 year ago

ScottMRafferty commented 1 year ago

Expected Behaviour

After fresh install, creating a basic course and clicking on the Preview Course button should show a course preview.

Actual Behaviour

Click Preview Course button and error appears in a dialog box stating that the grunt task failed. Node console showing a warning about unexpected character ? after the grunt handlebar task i.e. in the grunt javascript (compile) task.

Resolving Behaviour (in this scenario)

Not sure if this should go in this repo as it may be adapt_framework but I was primarily installing the Authoring tool. After making the following change I was able to get the preview working fine.

Modified the nullish coalescing operator (??) at line 127 to an OR operator (||) in tenant_id/adapt_framework/grunt/tasks/javascript.js.

Someone else may have come across this so I hope this helps. Great tool!

Versions

marissa-champions commented 1 year ago

Thanks for this. I was having issues upgrading the framework and this fixed it.