Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Previewing an announcement template without filling form field breaks javascript #112

Open
KashifSaadat opened this issue Aug 4, 2017 · 0 comments

Comments

@KashifSaadat
Copy link
Contributor

Description: When creating an announcement template with optional/required fields, if you attempt to preview the template whilst leaving the form fields blank it causes the page to be in an endless loading phase (and fails to show the preview).

Steps to recreate:

  1. Login to Platform Hub as an administrator
  2. Navigate to Announcement Templates in the left navigation bar
  3. Select NEW in the top right to create a template
  4. Fill in all the required sections as normal
  5. Select the ADD NEW FIELD button and specify a field with any type, leaving the required box unticked (with the select field, it can break both ways if you tick as required or leave optional)
  6. Select the OPEN PREVIEWER button at the bottom
  7. Leave the field empty and press the PREVIEW button

Expected results:

  • Required Field: The form should prevent you from submitting until a value has been specified
  • Optional Field: The announcement template should be rendered successfully

Actual results:
The loading attribute is added to the popup element eternally, and nothing renders. The console shows the following javascript error:

angular.js:14199 Error: "data" argument not specified or empty
    at Object.previewAnnouncementTemplate (hub-api.service.js:422)
    at exports.AnnouncementTemplatePreviewPopupController.preview (announcement-template-preview-popup.controller.js:35)
    at fn (eval at compile (angular.js:15126), <anonymous>:4:271)
    at expensiveCheckFn (angular.js:16213)
    at callback (angular.js:26592)
    at Scope.$eval (angular.js:17994)
    at Scope.$apply (angular.js:18094)
    at HTMLButtonElement.<anonymous> (angular.js:26597)
    at defaultHandlerWrapper (angular.js:3546)
    at HTMLButtonElement.eventHandler (angular.js:3534)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant