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

No custom dimensions in Matomo 4.0.0 #16786

Closed
ThorbenOermann opened this issue Nov 24, 2020 · 9 comments · Fixed by #16799
Closed

No custom dimensions in Matomo 4.0.0 #16786

ThorbenOermann opened this issue Nov 24, 2020 · 9 comments · Fixed by #16799
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@ThorbenOermann
Copy link

After updating to version 4.0.0 the custom dimensions seem to be gone. I did not find anything regarding this issue in the changelog, but I think custom dimensions are a core feature. Am I missing something, or did they move?

@tsteur
Copy link
Member

tsteur commented Nov 24, 2020

@ThorbenOermann this plugin should now be part of the Matomo core release. Can you go to "Administration -> Plugins" as a super user and check if the plugin is enabled?

@ThorbenOermann
Copy link
Author

I followed the update instructions from https://matomo.org/docs/update/#the-manual-three-step-update.

After the update to Matomo 4.0.0 I had to update a list of plugins. But the CustomDimensions plugin could not be updated. I get this notice:

image

Telling me that the CustomDimensions plugin depends on Piwik <4.0.0-b1. The plugin stays inactive and cannot be updated.

@ThorbenOermann
Copy link
Author

CustomDimensions now work for me. But I can´t tell you exactly what fixed it for me.

After the update to 4.0.0 the systemcheck told me that there are files I could delete. I did not delete them due to a possible downgrade, if I would not be able to get custom dimensions back to work. After your message I thought these files could be cause of the problem. So I deleted the files mentioned by the systemcheck.

 rm -Rf matomo/libs/Zend/Mail matomo/libs/Zend/Validate matomo/libs/bower_components matomo/libs/jquery matomo/vendor/container-interop matomo/vendor/matomo-org matomo/vendor/php-di/php-di/src/DI matomo/vendor/piwik matomo/vendor/twig/twig/ext matomo/vendor/twig/twig/lib

rm "matomo/config/config.ini.php.dist" "matomo/core/CronArchive/SegmentArchivingRequestUrlProvider.php" "matomo/core/CronArchive/SitesToReprocessDistributedList.php" "matomo/core/DataTable/Renderer/Php.php" "matomo/core/DeviceDetectorFactory.php" "matomo/core/MetricsFormatter.php" "matomo/core/Registry.php" "matomo/core/ScheduledTask.php" "matomo/core/TaskScheduler.php" "matomo/core/Translate.php" "matomo/libs/MaxMindGeoIP/geoip.inc" "matomo/libs/MaxMindGeoIP/geoipcity.inc" "matomo/libs/Zend/Mime.php" "matomo/libs/Zend/Mime/Decode.php" "matomo/libs/Zend/Mime/Exception.php" "matomo/libs/Zend/Mime/Message.php" "matomo/libs/Zend/Mime/Part.php" "matomo/misc/DBIP-City.mmdb.1604016309.old" "matomo/misc/others/ExamplePiwikTracker.php" "matomo/plugins/API/Renderer/Json2.php" "matomo/plugins/API/Renderer/Php.php" "matomo/plugins/Actions/Columns/InteractionPosition.php" "matomo/plugins/CoreHome/LoginWhitelist.php" "matomo/plugins/CoreHome/angularjs/dialogtoggler/dialogtoggler-urllistener.service.js" "matomo/plugins/CoreHome/angularjs/dialogtoggler/dialogtoggler.controller.js" "matomo/plugins/CoreHome/angularjs/dialogtoggler/dialogtoggler.directive.js" "matomo/plugins/CoreHome/angularjs/dialogtoggler/ngdialog.less" "matomo/plugins/CoreHome/javascripts/donate.js" "matomo/plugins/CoreHome/javascripts/iframeResizer.contentWindow.min.js" "matomo/plugins/CoreHome/javascripts/iframeResizer.min.js" "matomo/plugins/CoreUpdater/ReleaseChannel/Latest3XBeta.php" "matomo/plugins/CoreUpdater/ReleaseChannel/Latest3XStable.php" "matomo/plugins/CustomDimensions/CHANGELOG.md" "matomo/plugins/CustomDimensions/LICENSE" "matomo/plugins/CustomDimensions/README.md" "matomo/plugins/CustomDimensions/plugin.json" "matomo/plugins/CustomVariables/Columns/SearchCategory.php" "matomo/plugins/DevicePlugins/Columns/PluginDirector.php" "matomo/plugins/DevicePlugins/Columns/PluginGears.php" "matomo/plugins/Diagnostics/Diagnostic/LoadDataInfileCheck.php" "matomo/plugins/GeoIp2/Columns/Region.php" "matomo/plugins/Morpheus/fonts/piwik.svg" "matomo/plugins/Morpheus/fonts/piwik.ttf" "matomo/plugins/Morpheus/fonts/piwik.woff" "matomo/plugins/Morpheus/fonts/piwik.woff2" "matomo/plugins/Morpheus/images/paypal_subscribe.png" "matomo/plugins/Morpheus/images/smileyprog_0.png" "matomo/plugins/Morpheus/images/smileyprog_1.png" "matomo/plugins/Morpheus/images/smileyprog_2.png" "matomo/plugins/Morpheus/images/smileyprog_3.png"

rm "matomo/plugins/Morpheus/images/smileyprog_4.png" "matomo/plugins/SegmentEditor/SegmentList.php" "matomo/plugins/TagManager/Template/Variable/PreConfigured/FormDestionationVariable.php" "matomo/plugins/UserCountry/GeoIPAutoUpdater.php" "matomo/plugins/UserCountry/LocationProvider/GeoIp.php" "matomo/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php" "matomo/plugins/UserCountry/LocationProvider/GeoIp/Php.php" "matomo/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php" "matomo/plugins/UserCountry/Tasks.php" "matomo/plugins/UserCountry/angularjs/location-provider-updater/location-provider-updater.controller.js" "matomo/plugins/UserCountry/angularjs/location-provider-updater/location-provider-updater.directive.js" "matomo/plugins/UserCountry/templates/_updaterManage.twig" "matomo/plugins/UserCountry/templates/_updaterNextRunTime.twig" "matomo/plugins/VisitorInterest/Columns/VisitsByDaysSinceLastVisit.php" "matomo/vendor/doctrine/cache/build.properties" "matomo/vendor/doctrine/cache/build.xml" "matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php" "matomo/vendor/matomo/referrer-spam-blacklist/CONTRIBUTING.md" "matomo/vendor/matomo/referrer-spam-blacklist/README.md" "matomo/vendor/matomo/referrer-spam-blacklist/spammers.txt" "matomo/vendor/php-di/php-di/phpbench.json" "matomo/vendor/twig/twig/src/Extension/InitRuntimeInterface.php" "matomo/vendor/twig/twig/src/Loader/ExistsLoaderInterface.php" "matomo/vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php" "matomo/vendor/twig/twig/src/Node/SandboxedPrintNode.php" "matomo/vendor/twig/twig/src/Node/SetTempNode.php" "matomo/vendor/twig/twig/src/Node/SpacelessNode.php" "matomo/vendor/twig/twig/src/TokenParser/FilterTokenParser.php" "matomo/vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php"

I reloaded the plugins page and but it changed nothing.

For some other reason I then deleted an older website in matomo we do not need anymore.

Now 20 minutes later CustomDimension can be activated. Maybe it took some time after the deletion of the files 😕

The tracking was also broken. Our error log was full with messages like:

2020/11/25 07:20:35 [error] 18001#18001: *44913280 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method Piwik\Tracker\Request::getDaysSinceLastVisit() in /matomo/plugins/VisitorInterest/Columns/VisitsByDaysSinceLastVisit.php:38
Stack trace:
#0 /matomo/core/Tracker/Visit.php(499): Piwik\Plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit->onNewVisit()
#1 /matomo/core/Tracker/Visit.php(302): Piwik\Tracker\Visit->triggerHookOnDimensions()
#2 /matomo/core/Tracker/Visit.php(209): Piwik\Tracker\Visit->handleNewVisit()
#3 /matomo/core/Tracker.php(160): Piwik\Tracker\Visit->handle()
#4 /matomo/plugins/QueuedTracking/Queue/Processor/Handler.php(50): Piwik\Tracker->trackRequest()
#5 /matomo/plugins/QueuedTracking/Queue/Processor.php(194): Piwik\Plugins\QueuedTracking\Queue\Processor\Handler->process()
#6 /matomo/plugins/QueuedTracking/Queue/Processor.php(143): Piwik\Plugins\QueuedTracking\Q" while reading response header from upstream, client: 95.223.116.17, server: matomo.example.com, request: "POST /matomo.php?search=kein%20Suchbegriff&search_count=3&idsite=3&rec=1&r=194576&h=7&m=20&s=34&url=https%3A%2F%2Fwww.example.com%2F&urlref=https%3A%2F%2Fwww.aubi-plus.de%2F&_id=b12dcbb1fcf836df&_idn=0&_rcn=google_jobs_apply&_refts=1606284347&_ref=https%3A%2F%2Fwww.google.de&send_image=0&cookie=1&res=414x896&pv_id=fsO1Xz HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "matomo.aubi-plus.de", referrer: "https://www.example.com"

This messages now also do not apear anymore 👍

If the old files are such a problem maybe the systemcheck should not mark this as a warning but a failure?

@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Nov 25, 2020
@tsteur
Copy link
Member

tsteur commented Nov 25, 2020

@ThorbenOermann any chance you remember from which Matomo version you upgraded? If the plugin.json still existed maybe Matomo 4 thought the plugin is no longer compatible.

From what I see Matomo should have removed these files automatically but maybe the webserver does not have any write permission on your files? All good if you don't know

@tsteur tsteur reopened this Nov 25, 2020
@tsteur tsteur removed the answered For when a question was asked and we referred to forum or answered it. label Nov 25, 2020
@tsteur tsteur added this to the 4.0.1 milestone Nov 25, 2020
@tsteur
Copy link
Member

tsteur commented Nov 25, 2020

@sgiehl maybe we could include a plugin.json for custom dimensions at least for a while? not sure if this would have any side effects

@tsteur
Copy link
Member

tsteur commented Nov 25, 2020

@ThorbenOermann forget my question regarding write permission I just realise if Matomo was able to update itself, then it should have also been able to delete these files automatically.

@ThorbenOermann
Copy link
Author

@ThorbenOermann any chance you remember from which Matomo version you upgraded? If the plugin.json still existed maybe Matomo 4 thought the plugin is no longer compatible.

From what I see Matomo should have removed these files automatically but maybe the webserver does not have any write permission on your files? All good if you don't know

I updated from 3.14.1

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Nov 25, 2020
@ThorbenOermann
Copy link
Author

ThorbenOermann commented Nov 25, 2020

@ThorbenOermann forget my question regarding write permission I just realise if Matomo was able to update itself, then it should have also been able to delete these files automatically.

Matomo did not update itself. I updated it following the instructions from https://matomo.org/docs/update/#the-manual-three-step-update.

I did not realized the actual problem because the systemcheck did only show a warning that some files are not needed anymore. But in fact the old files seem to break custom dimensions and tracking in some cases. Probably this problem only appears when doing the update manual.

@tsteur
Copy link
Member

tsteur commented Nov 25, 2020

Thanks @ThorbenOermann this explains it. We'll likely add a plugin.json now this plugin so next time someone does it in a similar way it won't be causing a problem. Thanks for your help 👍

diosmosis pushed a commit that referenced this issue Nov 26, 2020
* Add pluginjson for custom dimensions

fix #16786

* fix build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants