Skip to content

Create issue with issuable_template URL param fails to render template content with the Rich Text editor

Summary

Opening a URL to create a new issue, with issuable_template= in the URL parameters to select an issue template, creates an error in the Rich text editor. Click on Retry loads the template, cmd+r does not work. Works fine with Markdown mode.

Steps to reproduce

  1. Switch to the rich text editor in your session profile (i.e. from an issue form)
  2. Create a new issue, and append the issuable_template URL parameter to select one of the project's issue templates
  3. Get an error and the template content is not applied.
  4. Requires click on reload, page reload does not fix the problem.

Example Project

https://gitlab.com/gitlab-com/marketing/corporate_marketing/corporate-marketing/-/issues/new?issuable_template=social-event-sponsored-request

What is the current bug behavior?

Form errors out. Requires manual retry action.

What is the expected correct behavior?

Form loads the URL provided issue template content into the Rich Text Editor.

Relevant logs and/or screenshots

image.png

Browser dev console

image.png

Output of checks

This bug happens on GitLab.com SaaS.

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:env:info\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`)

(For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`)

(we will only investigate if the tests are passing)

Possible fixes

/cc @himkp