Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add imprint URL to Template.pageFooter #16965

Closed
wedi opened this issue Dec 15, 2020 · 2 comments · Fixed by #16966
Closed

Add imprint URL to Template.pageFooter #16965

wedi opened this issue Dec 15, 2020 · 2 comments · Fixed by #16966
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@wedi
Copy link
Contributor

wedi commented Dec 15, 2020

Hi,

would you accept a pull request that extends on PR #13219 to add an Imprint URL to Template.pageFooter and settings?

Reasoning: Most sites I know of have distinct pages for data privacy policy, terms & conditions and the imprint and right now there is no way to link an imprint which is required by some German law.
The issue this PR was created from (#12938) and its duplicate #7513 actually mention the imprint but there is no reason stated why it was omitted.

This would be my first contribution to Matomo. Is there anything special I should bear in mind when implementing this?

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Dec 15, 2020
@tsteur
Copy link
Member

tsteur commented Dec 15, 2020

Hi @wedi yes we would accept such a PR 👍 I can't really think of anything special to consider here. It would basically work like the privacy policy URL etc.

@wedi
Copy link
Contributor Author

wedi commented Dec 16, 2020

I have created pull request #16966 after some copy'n'pasting. Unfortunately, I was not able to run the tests. I put an hour into it but did not get it to work.

In case you are interested, I followed this writeup: https://developer.matomo.org/guides/getting-started-part-1

Setting up Matomo was quick and smooth. Just a little 🤔-moment when a screenshot did not match up with the text. The trouble started when I was to generate visitors. This failed with a (very misleading) curl timeout which I did not manage to solve till I checked the generate visitors plugin to learn how to run the cli. That got me a much better error message:

~/code/matomo 4.x-dev*
$ ./console visitorgenerator:generate-visits --idsite 1 --days 3
Generating visits for 2020-12-14...
ERROR [2020-12-16 00:04:01] 23803  Uncaught exception: /Users/weise/code/matomo/vendor/matomo/matomo-php-tracker/MatomoTracker.php(1779): You must first set the Matomo Tracker URL by calling
                 MatomoTracker::$URL = 'http://your-website.org/matomo/';
You must first set the Matomo Tracker URL by calling
                 MatomoTracker::$URL = 'http://your-website.org/matomo/';


                                                                             
  [Exception]                                                                
  You must first set the Matomo Tracker URL by calling                       
                   MatomoTracker::$URL = 'http://your-website.org/matomo/';  
                                                                             


visitorgenerator:generate-visits [--idsite="..."] [--days="..."] [--start-date="..."] [--no-fake] [--no-logs] [--limit-fake-visits="..."] [--custom-matomo-url="..."] [--timeout="..."]

A good guess made me try the --custom-matomo-url="..." parameter and it worked and it really tested my nerves on a quite capable 2020 MacBook Pro:


~/code/matomo 4.x-dev*
❯ ./console visitorgenerator:generate-visits --idsite 1 --days 3 --custom-matomo-url=http://localhost/
Generating visits for 2020-12-14...
Generating visits for 2020-12-15...
Generating visits for 2020-12-16...

idsite = 1
4715 Visits generated
4 requests per second

Next up was running the tests. I set up [database_tests] as described, was surprised that the paragraph "If you want to execute the automated test suite" ended after adding some config and not after executing tests but found the link to the automated tests guide at the bottom of the page.

My final result was the following error. I did some googling but the only thing I found were older issues that stated that database setup should be done automatically and turned out not to be related to my problem otherwise. This was when I gave up and handed this matter over to CI.

~/code/matomo 4.x-dev*
$ ./console tests:run PrivacyManager
Executing command: cd /Users/weise/code/matomo/tests/PHPUnit &&  /Users/weise/code/matomo/vendor/bin/phpunit   /Users/weise/code/matomo/plugins/PrivacyManager/tests

Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matomo_tests.option' doesn't exist in /Users/weise/code/matomo/libs/Zend/Db/Statement/Pdo.php:233
Stack trace:
#0 /Users/weise/code/matomo/libs/Zend/Db/Statement/Pdo.php(233): PDOStatement->execute()
#1 /Users/weise/code/matomo/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /Users/weise/code/matomo/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /Users/weise/code/matomo/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT option_v...', Array)
#4 /Users/weise/code/matomo/core/Db/Adapter/Pdo/Mysql.php(309): Zend_Db_Adapter_Pdo_Abstract->query('SELECT option_v...', Array)
#5 /Users/weise/code/matomo/libs/Zend/Db/Adapter/Abstract.php(736): Piwik\Db\Adapter\Pdo\Mysql->query('SELECT option_v...', Array)
#6 /Users/weise/code/matomo/core/Db.php(297): Zend_Db_Adapter_Abstract->fetchAll('SELECT option_v...', Array)
#7 /Users/weise/code/matomo/core/Opti in /Users/weise/code/matomo/libs/Zend/Db/Statement/Pdo.php on line 236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants