Modules of type 'Survey' made public generate incorrect links for non-roled users if the survey name contains a space.
This issue occurs only when logged out and if the module is accessed via the public method described in Modify a survey definition. When logged in, the module works as expected.
Steps to Reproduce
- Navigate to Survey > Legacy Surveys > Masters.
- Click New.
- Enter PRB Test Survey in the Name field.
- Right-click on the form header, and choose Save.
- Navigate to System Definition > Application Menus.
- Open the record with the title Self-Service.
- Add the public role to the record, and press Update.
- Navigate to System Definition > Modules.
- Click New.
- Use the following details for the new record, then press Submit:
- Title: PRB Test Survey Module
- Application menu: Self-Service (itil_self_service)
- Roles: public
- Link type: Survey
- Survey: PRB Test Survey
- Navigate to System Diagnostics > Cache Flush.
- Log out.
- Reload the entire page.
- Navigate to Self-Service > PRB Test Survey Module.
Instead of the survey loading within the iframe of the nav_to.do page, the following behavior occurs:
- The iframe of the nav_to.do page is blank.
- The URL contains unusual characters, for example:
Uncaught TypeError: Cannot read property 'removeAttribute' of null
Change the module's Link type to URL (from Arguments:) instead. Within the Arguments field, paste the URL of the survey.
You can find the URL of the survey by opening the Survey you created (survey_master) in its own tab/window and then clicking the Take Survey UI Action. The page that loads is the survey_take.do page with the appropriate parameters to access that particular survey. You should use the last part of the URL in the Arguments field of the module. For example, use the bold section in the following URL:
Related Problem: PRB691034