@ThorbenOermann opened this Issue on November 24th 2020

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 commented on November 24th 2020 Member

@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 commented on November 25th 2020

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 commented on November 25th 2020

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<a href='/18001'>#18001</a>: *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:
<a href='/0'>#0</a> /matomo/core/Tracker/Visit.php(499): Piwik\Plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit->onNewVisit()
<a href='/1'>#1</a> /matomo/core/Tracker/Visit.php(302): Piwik\Tracker\Visit->triggerHookOnDimensions()
<a href='/2'>#2</a> /matomo/core/Tracker/Visit.php(209): Piwik\Tracker\Visit->handleNewVisit()
<a href='/3'>#3</a> /matomo/core/Tracker.php(160): Piwik\Tracker\Visit->handle()
<a href='/4'>#4</a> /matomo/plugins/QueuedTracking/Queue/Processor/Handler.php(50): Piwik\Tracker->trackRequest()
<a href='/5'>#5</a> /matomo/plugins/QueuedTracking/Queue/Processor.php(194): Piwik\Plugins\QueuedTracking\Queue\Processor\Handler->process()
<a href='/6'>#6</a> /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 commented on November 25th 2020 Member

@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 commented on November 25th 2020 Member

@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 commented on November 25th 2020 Member

@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 commented on November 25th 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

I updated from 3.14.1

@ThorbenOermann commented on November 25th 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 commented on November 25th 2020 Member

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 πŸ‘

This Issue was closed on November 26th 2020
Powered by GitHub Issue Mirror