Merge request approval button gets hidden automatically

Reported by @stefan.rempe

Summary

(Summarize the bug encountered concisely)

The button "Accept Merge Requests" on the merge requests page get automatically hidden if I use our template for merge requests.

Steps to reproduce

(How one can reproduce the issue - this is very important)

  1. Open an merge request with the template from the code block below
  2. Refresh the page

Expected behavior

(What you should see instead)

The div with the id "merge-requests-widget-app" should be visible

Actual behavior

(What actually happens)

The div with the id "merge-requests-widget-app" is hidden. Also there is an error in the developer console.

The "Accpet Merge Requests button

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

This is the template we use.

## Was macht dieser Merge Request?



(Beschreibe kurz, was dein Merge Request machen soll? Dies ist wichtig für den Tester. Wenn du der Meinung bist die Beschreibung des
Issues reicht aus, dann verlinke diese mit einer # (z.B.: #100))



## Welche vorkehrungen müssen für das testen dieses Merge Requests getroffen werden? 



(Hast du neue Packages installiert? Müssen spezielle Einstellungen vorgenommen werden, 
damit dieser Merge Request
 getestet werden kann? - Dann dokumentiere es hier und **zusätzlich in der .env.example**)



## Zusätzliche Informationen

(Du hast noch etwas vergessen, was der Tester wissen muss oder es passt in keinen obrigen Punkt? - Dann hier rein damit!)

This is the error from the developer console. image

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

This bug happens on GitLab.com

Results of 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)

Results of 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)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading