Navigation Menu

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

Error when attempting to view Scheduled Reports (Key "name" for array with keys does not exist) #8401

Closed
dperzanowski opened this issue Jul 22, 2015 · 13 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@dperzanowski
Copy link

When clicking on the "Email Reports" under the Personal Administration area, I get the following error:

Key "name" for array with keys "category, module, action, metrics, metricsDocumentation, processedMetrics, imageGraphUrl, imageGraphEvolutionUrl, uniqueId" does not exist in "@ScheduledReports/_addReport.twig" at line 150

The installation this is happening on was updated originally from 2.0.2 to 2.12 and has been incrementally updated 2.14.1 since the large update.

I have supplied a screenshot of the message below.

screen shot 2015-07-22 at 1 27 09 pm

@mattab
Copy link
Member

mattab commented Jul 28, 2015

Hi @dperzanowski

in Administration > System check, do you see any warning?

Do you use any third party plugin in Administration > Plugins?

@dperzanowski
Copy link
Author

In the system check, everything shows up with a green checkmark. As for third party plugins, we use the cacheBuster and LoginLdap plugins.

@mattab
Copy link
Member

mattab commented Aug 10, 2015

in the file plugins/ScheduledReports/templates/_addReport.twig at line 148, can you replace {{ report.name|raw }} by {{ report.uniqueId|raw }} and post here what reportId you see on the screen?

@dperzanowski
Copy link
Author

Hey @mattab

That appears to have fixed the issue of even loading the Reports page. I have added a screenshot below.

screen shot 2015-08-10 at 2 02 28 pm

I was also able to create a report and download it.

@mattab
Copy link
Member

mattab commented Aug 12, 2015

Could you also please paste screenshot of the "New report screen" ?

@dperzanowski
Copy link
Author

Sure thing. They are below:

screen shot 2015-08-12 at 9 02 04 am
screen shot 2015-08-12 at 9 02 20 am

@mattab
Copy link
Member

mattab commented Aug 12, 2015

ok sorry, I need to try again: can you replace the new {{ report.uniqueId|raw }} by {{ report.uniqueId|raw }} {% if report.name is defined %}{{report.name}}{% else %} UNDEFINED {% endif %}

and again paste the screenshot?

@mattab
Copy link
Member

mattab commented Sep 18, 2015

Hi @dperzanowski can you replace the new {{ report.uniqueId|raw }} by {{ report.uniqueId|raw }} {% if report.name is defined %}{{report.name}}{% else %} UNDEFINED {% endif %}

and again paste the screenshot?

@dperzanowski
Copy link
Author

screen shot 2015-09-18 at 9 48 29 am
screen shot 2015-09-18 at 9 48 41 am

@mattab
Copy link
Member

mattab commented Sep 20, 2015

Thanks for this, unfortunately @jantlwoomy I was expecting to see a UNDEFINED in the output but it's not there...

Does anyone else experience this error in Piwik? Key "name" for array with keys "category, module, action, metrics, metricsDocumentation, processedMetrics, imageGraphUrl, imageGraphEvolutionUrl, uniqueId" does not exist in "@ScheduledReports/_addReport.twig"

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 20, 2015
@mattab mattab added this to the Short term milestone Sep 20, 2015
@mattab mattab changed the title Error when attempting to view Scheduled Reports Error when attempting to view Scheduled Reports (Key "name" for array with keys does not exist) Sep 20, 2015
@mattab mattab modified the milestones: Mid term, Short term Sep 22, 2015
@mattab
Copy link
Member

mattab commented Nov 12, 2015

Can't reproduce for now, please comment if you have this error

@mattab mattab closed this as completed Nov 12, 2015
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Nov 12, 2015
@jorgeuos
Copy link

jorgeuos commented May 3, 2021

Hi,
We are experiencing this in Matomo 3.14.1, will try to patch with suggested fix and post the output.

diff --git a/plugins/ScheduledReports/templates/_addReport.twig b/plugins/ScheduledReports/templates/_addReport.twig
index 11f960619f..fc96d35931 100644
--- a/plugins/ScheduledReports/templates/_addReport.twig
+++ b/plugins/ScheduledReports/templates/_addReport.twig
@@ -160,7 +160,7 @@
                                 <input type='{{ reportInputType }}' id="{{ reportType }}{{ report.uniqueId }}" report-unique-id='{{ report.uniqueId }}'
                                        name='{{ reportType }}Reports'/>
                                 <label for="{{ reportType }}{{ report.uniqueId }}">
-                                    {{ report.name|rawSafeDecoded }}
+                                    {{ report.uniqueId|rawSafeDecoded }}: {% if report.name is defined %}{{report.name|rawSafeDecoded}}{% else %} NAME UNDEFINED {% endif %}
                                     {% if report.uniqueId=='MultiSites_getAll' %}
                                         <div class="entityInlineHelp">{{ 'ScheduledReports_ReportIncludeNWebsites'|translate(countWebsites)
                                             }}</div>

Br, Jorge

@jorgeuos
Copy link

jorgeuos commented May 3, 2021

The error occurs when a limited user is trying to access the list of reports, and there is non.
The patch solved it, also confirmed with 4.1.1. See patch for 4.1.1 below:

diff --git a/plugins/ScheduledReports/templates/_addReport.twig b/plugins/ScheduledReports/templates/_addReport.twig
index b1ccb4aa6d..fbc914bee7 100644
--- a/plugins/ScheduledReports/templates/_addReport.twig
+++ b/plugins/ScheduledReports/templates/_addReport.twig
@@ -160,7 +160,7 @@
                                 <label>
                                     <input type='{{ reportInputType }}' id="{{ reportType }}{{ report.uniqueId }}" report-unique-id='{{ report.uniqueId }}'
                                            name='{{ reportType }}Reports'/>
-                                    <span>{{ report.name|rawSafeDecoded }}</span>
+                                    <span>{{ report.uniqueId|rawSafeDecoded }}: {% if report.name is defined %}{{report.name|rawSafeDecoded}}{% else %} NAME UNDEFINED {% endif %}</span>
                                     {% if report.uniqueId=='MultiSites_getAll' %}
                                         <div class="entityInlineHelp">{{ 'ScheduledReports_ReportIncludeNWebsites'|translate(countWebsites)
                                             }}</div>

br, Jorge

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. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants