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

The string CustomDimensions_IncreaseAvailableCustomDimensionsTitle was not loaded in javascript. Make sure it is added in the Translate.getClientSideTranslationKeys hook. #9584

Closed
weber-d opened this issue Jan 20, 2016 · 5 comments · Fixed by matomo-org/plugin-CustomDimensions#24
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@weber-d
Copy link

weber-d commented Jan 20, 2016

I'm new to Piwik and would like to try the CustomDimensions Plugin so I installed the Beta-Version of Piwik. According to the documentation, I opened the personal settings page by clicking on the person icon in the top navigation bar at the right, followed by Custom Dimensions.

On This page I see a never ending spinner loading data and multiplice error of not loaded strings like The string CustomDimensions_CustomDimensions was not loaded in javascript. Make sure it is added in the Translate.getClientSideTranslationKeys hook:

Tested environment:

  • Apache 2.4 on Windows 7 (XAMPP-Bundle) with PHP 7.0.1
  • Piwik 2.16.0-b4
  • CustomDimensions v0.1.2

I also tried this on older PHP versions of the 5.6 branch because I assumed that Piwik or the CustomDimensions plugin may not be full compatible with PHP 7 yet, but I got the same error.

@tsteur
Copy link
Member

tsteur commented Jan 20, 2016

Can you try to delete the files within the folder tmp/cache?

I tried to reproduce with PHP 7 and worked fine for me.

@weber-d
Copy link
Author

weber-d commented Jan 21, 2016

I tried that, unfortunately without any effect. But I took a closer look at the files in the tmp/cache/tracker folder because the files inside were generated when I call the Custom Dimensions entry in the menu.

I found out that there are two language-files, called piwikcache_Translations-en-{$hash}.php and piwikcache_Translations-de-{$hash}.php where {$hash} is a string like f2e5cd85c39e6c78f64c1a41d155f2ea691b19aa. In the English file (en) I found an array with the key CustomDimensions containing some phrases. But in the Eerman file (de) it's completely missing, which fit to the error message.

So I tried to switch the language in my piwik account from German to English and it worked! The problem seems to be that the CustomDimensions plugin wasn't translated to German, which I didn't expexted because all other plugins I'm using working fine with German.

Don't know if this is a mistake to be fixed. But as the dimensions are recommended as an alternative to the custom variables, it would be a good idea to translate the plugin at least for the final release to German I think.

@sgiehl
Copy link
Member

sgiehl commented Jan 21, 2016

Our translations are community contributed. If you would like to help, please get an account on transifex: https://www.transifex.com/piwik/piwik/

Nevertheless, missing translations shouldn't cause anything to fail. Piwik is designed that if a certain text is not translated to the currently selected language, it should fall back to the english default, and display that instead. Guess we need to investigate why that doesn't work in your case.

@tsteur
Copy link
Member

tsteur commented Jan 21, 2016

This is actually a bug and I will work on a fix asap. I thought I'm smart and simple pass all translations of this plugin to JavaScript as it is build in angularjs. Turns out Translator::getAllTranslations() doesn't return all translations and it wasn't so smart to do this :)

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 21, 2016
@tsteur tsteur added this to the 2.16.0 milestone Jan 21, 2016
tsteur added a commit to matomo-org/plugin-CustomDimensions that referenced this issue Jan 21, 2016
@tsteur
Copy link
Member

tsteur commented Jan 21, 2016

I just released a new version of the plugin and an update should be available soon. You might want to press "check for updates" in the Administration to get the update earlier.

@tsteur tsteur self-assigned this Jan 21, 2016
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.

3 participants