would you accept a pull request that extends on PR https://github.com/matomo-org/matomo/pull/13219 to add an Imprint URL to
Template.pageFooter and settings?
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?
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: <a href='/0'>#0</a> /Users/weise/code/matomo/libs/Zend/Db/Statement/Pdo.php(233): PDOStatement->execute() <a href='/1'>#1</a> /Users/weise/code/matomo/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array) <a href='/2'>#2</a> /Users/weise/code/matomo/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) <a href='/3'>#3</a> /Users/weise/code/matomo/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT option_v...', Array) <a href='/4'>#4</a> /Users/weise/code/matomo/core/Db/Adapter/Pdo/Mysql.php(309): Zend_Db_Adapter_Pdo_Abstract->query('SELECT option_v...', Array) <a href='/5'>#5</a> /Users/weise/code/matomo/libs/Zend/Db/Adapter/Abstract.php(736): Piwik\Db\Adapter\Pdo\Mysql->query('SELECT option_v...', Array) <a href='/6'>#6</a> /Users/weise/code/matomo/core/Db.php(297): Zend_Db_Adapter_Abstract->fetchAll('SELECT option_v...', Array) <a href='/7'>#7</a> /Users/weise/code/matomo/core/Opti in /Users/weise/code/matomo/libs/Zend/Db/Statement/Pdo.php on line 236