Goal_patterns in JavaScript

Hello Everybody :slight_smile:

I get an error in Matomo 3.1.10 in “Goals”.

When trying to create a new goal, the text:

“The string Goals_Patterns was not loaded in javascript. Make sure it is added in the Translate.getClientSideTranslationKeys hook.”

appears in the pattern of the goal. I’ve tried to delete the files in tmp/ (Suggestion found for Piwik 2.7.0), without any changes in the messages. All plugins are updated to the latest. Goals is a core plugin.

Any help is very much appropriated :slight_smile:
Thank you
Flemming

Hi,

This is a bug that will be fixed in the next release:

If you can’t wait, you can manually apply the change from the PR:

diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index d0c84ec7c5..8ad81a1144 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -368,5 +368,6 @@ public function getClientSideTranslationKeys(&$translationKeys)
         $translationKeys[] = 'Goals_Ecommerce';
         $translationKeys[] = 'Goals_Optional';
         $translationKeys[] = 'Goals_TimeInMinutes';
+        $translationKeys[] = 'Goals_Pattern';
     }
 }
diff --git a/plugins/Goals/angularjs/manage-goals/manage-goals.controller.js b/plugins/Goals/angularjs/manage-goals/manage-goals.controller.js
index e8431afa6d..44fd866889 100644
--- a/plugins/Goals/angularjs/manage-goals/manage-goals.controller.js
+++ b/plugins/Goals/angularjs/manage-goals/manage-goals.controller.js
@@ -207,9 +207,9 @@
         };
 
         this.getPatternFieldLabel = function () {
-            return this.goal.matchAttribute === 'visit_duration' ? _pk_translate('Goals_TimeInMinutes') : _pk_translate('Goals_Patterns');
+            return this.goal.matchAttribute === 'visit_duration' ? _pk_translate('Goals_TimeInMinutes') : _pk_translate('Goals_Pattern');
         };
 
         this.showListOfReports(false);
     }

And afterwards delete the temporary files.

Thank you! I couldn’t find information about the patch.

Regards
Flemming

Hello all :slight_smile:

I tried to add the patch, but unsuccessfully. It still gives the same message.
I deleted all files in tmp/ and it stil gives same error message for Goals_Patterns.
I’ll wait for the next release :slight_smile:

Have a great day!
Flemming

Hi, we have Matomo 3.11.0 and got the same issue. In which version would be the bug patched?

Hi,

The bug is fixed in Matomo 3.12.