Piwik Script stopped working with 12.2
Summary
With 12.2 the piwik javascript code does no longer work
Steps to reproduce
Configure piwik:
gitlab_rails['extra_piwik_url'] = '…'
gitlab_rails['extra_piwik_site_id'] = '1'
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
Javascript failure is shown in the browsers console
What is the expected correct behavior?
Javascript for piwik is executed correctly
Relevant logs and/or screenshots
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.2.1-ee Revision: e4a8b6c773a Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.11 URL: https://hpm.agency HTTP Clone URL: https://hpm.agency/some-group/some-project.git SSH Clone URL: git@hpm.agency:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /gitlab-data/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
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
- We removed the
<noscript>
at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/layouts/_piwik.html.haml#L14 - That way piwik started working again