-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Added a config for custom_dimensions_max_length issue-16150 #22582
Open
jorgeuos
wants to merge
23
commits into
matomo-org:5.x-dev
Choose a base branch
from
jorgeuos:jorge-issue-16150
base: 5.x-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…CustomDimensions/Tracker/CustomDimensionsRequestProcessor.php:prepareValue() to use the config instead of being hardcoded.
jorgeuos
changed the title
Added a config for custom_dimensions_max_length and refactor…
Added a config for custom_dimensions_max_length issue-16150
Sep 12, 2024
This is to fix the issue-16150 |
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
github-actions
bot
added
the
Stale
The label used by the Close Stale Issues action
label
Sep 27, 2024
Co-authored-by: diosmosis <[email protected]>
* Translated using Weblate (Latvian) Currently translated at 24.2% (17 of 70 strings) Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Co-authored-by: Liena Ritere <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-login/lv/ Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-privacymanager/ Translation: Matomo/Plugin Login Translation: Matomo/Plugin PrivacyManager * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin Login Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-login/ --------- Co-authored-by: Liena Ritere <[email protected]>
* Fix archiving for range periods * adds another test
Co-authored-by: diosmosis <[email protected]>
…to a user (matomo-org#22554) * Add information about risks associated with giving super user access to a user * Update risks to allow ActivityLog plugin upsell and link to it when activated * Update UI test screenshots * Add UI tests with ActivityLog and without Marketplace * Tweak UI test spec * Update UI test screenshots * Update UI test screenshots from CI run * Ensure to reload the user manager page after changing plugins config * Reset modal confirmation UI test screenshot * Use the same modal screenshot approach as used elsewhere in the suite
* Add configuration for database connection collation * Rename "connection_collation" config to "collation" * Pass configured database collation to table creation statements * Detect default collation to be used during database creation * Save default database collation to config during installation * Update database collection config if auto-detectable * Add database collation to diagnostics * Configure default collation for test environment * Update expected screenshots * Look at most recent archive table for update collation detection
* Update translation files Updated by "Squash Git commits" hook in Weblate. Update translation files Updated by "Squash Git commits" hook in Weblate. Update translation files Updated by "Squash Git commits" hook in Weblate. Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-corehome/ Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-deviceplugins/ Translation: Matomo/Plugin CoreHome Translation: Matomo/Plugin DevicePlugins * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin WebsiteMeasurable Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-websitemeasurable/
matomo-org#22603) * Ensure LatestStable release channel uses the version provided from API * Adjust test and link in UI * always download latest stable if no version provided
* use sha256 instead of md5 for file integrity checks * apply review feedback * updates expected UI test files
* Require Write access for adding annotations in UI * adds UI test
* Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-privacymanager/ Translation: Matomo/Plugin PrivacyManager * Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-privacymanager/ Translation: Matomo/Plugin PrivacyManager * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin Login Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-login/ * Translated using Weblate (Latvian) Currently translated at 100.0% (60 of 60 strings) Translation: Matomo/Plugin ScheduledReports Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-scheduledreports/lv/ * Translated using Weblate (German) Currently translated at 100.0% (35 of 35 strings) Translation: Matomo/Plugin VisitFrequency Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-visitfrequency/de/ * Translated using Weblate (Latvian) Currently translated at 15.2% (36 of 236 strings) Translation: Matomo/Plugin UsersManager Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-usersmanager/lv/ * Translated using Weblate (Latvian) Currently translated at 100.0% (226 of 226 strings) Translation: Matomo/Plugin PrivacyManager Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-privacymanager/lv/ * Translated using Weblate (Czech) Currently translated at 30.0% (21 of 70 strings) Translation: Matomo/Plugin Login Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-login/cs/ --------- Co-authored-by: Hosted Weblate <[email protected]> Co-authored-by: Liena Ritere <[email protected]> Co-authored-by: PeteTrombone <[email protected]> Co-authored-by: Jiří Podhorecký <[email protected]>
* Limit the end date of range periods to 10 years in the future * Mark method as api * Apply review feedback Co-authored-by: Marc Neudert <[email protected]> --------- Co-authored-by: Michal Kleiner <[email protected]> Co-authored-by: Marc Neudert <[email protected]>
Co-authored-by: caddoo <[email protected]>
* Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-sitesmanager/ Translation: Matomo/Plugin SitesManager * Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <[email protected]> Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-sitesmanager/ Translation: Matomo/Plugin SitesManager * Update translation files Updated by "Squash Git commits" hook in Weblate. Translation: Matomo/Plugin CorePluginsAdmin Translate-URL: https://hosted.weblate.org/projects/matomo/plugin-corepluginsadmin/
…ive message on PCLZIP_ERR_BAD_FORMAT error (matomo-org#22567) * Adds code to check plugin wise license status and download link, #PG-3814, #PG-3770 * Build vue files * fixes PHPCS error * PR feedback applied * phpcs fixes * More refactoring * Added UI tests * Adds more UI tests * PR fixes and UI test updated * Fixes Ui tests and adds new screenshot * Improved checks to check if it has a download link * textual changes * Fixes some tests * Fixes UI tests * Fixes for UI test * UI fixes * Ui fixes to capture correct screenshot * Updated text * UI screenshots updated and error messaged updated for PCLZIP error * PR changes * Changes to show the error message correctly for PCLIB error * textual changes * Updated UI screenshot * Applied PR suggestion * Fixes PHPCS * Fixes UI test * Fixes for UI test * UI test updated * UI screenshot updated * Adds more UI tests * Adds new UI screenshot * Apply PR feedback * Fixes to display messages correctly * Updated text * Fixes for licenseStatus * Updated UI screenshots * Fixes description not displaying * Updated UI screenshot * Improved message for donwload link missing * PF feedback and screenshot updated * Textual changes and UI screenshot updated --------- Co-authored-by: AltamashShaikh <[email protected]>
* Update all submodules * Increase version * updates expected UI test files --------- Co-authored-by: diosmosis <[email protected]> Co-authored-by: Stefan Giehl <[email protected]>
This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers |
github-actions
bot
added
the
Stale for long
The label used by the Close Stale Issues action
label
Nov 13, 2024
plugins/CustomDimensions/Tracker/CustomDimensionsRequestProcessor.php
Outdated
Show resolved
Hide resolved
…sor.php Make sure value is an int Co-authored-by: Michal Kleiner <[email protected]>
Ah, makes sense! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Stale for long
The label used by the Close Stale Issues action
Stale
The label used by the Close Stale Issues action
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a config for custom_dimensions_max_length and refactor plugins/CustomDimensions/Tracker/CustomDimensionsRequestProcessor.php:prepareValue() to use the config instead of being hardcoded.
Description:
I will change the max length for custom dimensions in:
https://github.com/matomo-org/matomo/blob/4.11.0-rc1/plugins/CustomDimensions/Tracker/CustomDimensionsRequestProcessor.php#L175
To see how it behaves before I apply my fix.
I'm tracking custom dimensions with a default installation of Matomo. No extra configuration or plugins added.
The default
custom_dimension_1
type is varchar(255) in the database.The tracking code is:
I'm modifying the php function like this:
Story 1:
Stored value in MySQL:
Which equals 250 characters exactly.
custom_dimension_1 type is varchar(255) in the database.
Story 2:
Stored value in MySQL:
Which equals 255 characters exactly.
custom_dimension_1 type is varchar(255) in the database.
Story 3:
Stored value in MySQL:
This means that MySQL is not storing the value because it is too long. No error is shown in the UI and there is no Tracking failures in the log.
custom_dimension_1 type is varchar(255) in the database.
Story 4:
According to this issue in Github: Allow custom dimensions of any size (custom_dimension_X fields of unlimited length column (TEXT type) instead of VARCHAR 255) #16150 we can alter the column type in the database like this:
Which would also help with another unrelated issue: https://forum.matomo.org/t/error-while-updating-to-4-0-0-b1-have-to-change-some-columns-to-text-or-blobs/39482
After a successful change in the database, I will track a custom dimension with a value that is too long so that I can see how Matomo behaves.
custom_dimension_1 type is now TEXT in the database.
Stored value in MySQL:
Which equals 256 characters exactly.
custom_dimension_1 type is TEXT
Story 5:
Stored value in MySQL:
Which equals 250 characters exactly.
custom_dimension_1 type is TEXT in the database.
Conclusion
The default maximum length for custom dimensions is 250 characters. If a value exceeds this limit, it will be truncated and stored, unless the length exceeds 255 characters (the database limit for varchar(255)), in which case it will not be stored at all. Additionally, no error is displayed in the user interface, and no tracking failures are logged.
To fix this issue, a user needs to change the column type for custom dimensions in the database from varchar(255) to TEXT.
Potential edge cases thought about:
The
log_link_visit_action
andlog_conversion
tables also have custom dimension columns that need to be updated.Review