sualko / cloud_piwik

Track @Nextcloud users with @matomo-org (formerly Piwik)
http://sualko.github.io/cloud_piwik/
MIT License
37 stars 18 forks source link

Call to undefined method OC\Server::getContentSecurityPolicyNonceManager() (Owncloud no longer supported?) #67

Closed ted-strauss-K1 closed 5 years ago

ted-strauss-K1 commented 5 years ago

Expected behavior

Go to step 2 of plugin installation.

Actual behavior

Owncloud crashes after cloning this plugin into the apps directory. owncloud.log throws this error: Error: Call to undefined method OC\Server::getContentSecurityPolicyNonceManager()

I checked the current OC core, and there is no function with that name. Is there an earlier version of this plugin that might still work with OC? Is there a workaround to this missing function? Thanks

Steps to reproduce the behavior

  1. Following installation instructions ...
  2. Cloned this repo into folder piwik into owncloud/apps/
  3. Refresh OC web, shows error screen and writes error logs.

Environment

Latest commit f32be86

Owncloud version 10.0.10.4

Chrome

yes, multiple.

yes. works fine with other apps.

Logs

{"reqId":"HThSUq3ZS33e0DQ4Uhcd","level":3,"time":"2019-04-05T21:10:11+00:00","remoteAddr":"xxx.xxx.178.43","user":"admin","app":"PHP","method":"GET","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json","message":"Error: Call to undefined method OC\Server::getContentSecurityPolicyNonceManager() at \/var\/www\/owncloud\/apps\/piwik\/appinfo\/app.php#9"}

Javascript

will report back on this one... 

Nextcloud

n/a
sualko commented 5 years ago

Yes. Owncloud support was silently removed in 0.4, because after the split, I had the feeling that there was no love from Owncloud for app developers. So I stopped supporting Owncloud in all my applications.

If you like you can try to remove the corresponding section in https://github.com/sualko/cloud_piwik/blob/0f83f50202df803f5012e4f2bfaf9412db333d42/appinfo/app.php#L18-L26

ted-strauss-K1 commented 5 years ago

http://sualko.github.io/cloud_piwik/ you might want to update this page since it still advertises the app as being intended for OC.

sualko commented 5 years ago

Thanks for the hint. I will update the page asap.