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

Default report produces error 500 Internal Server Error #13695

Closed
1 task done
juangadiel opened this issue Apr 25, 2024 · 12 comments
Closed
1 task done

Default report produces error 500 Internal Server Error #13695

juangadiel opened this issue Apr 25, 2024 · 12 comments
Labels
bug Issues or PR's relating to bugs essential This must be done to close the milestone regression A bug that broke something in the last release reports Anything related to reports
Milestone

Comments

@juangadiel
Copy link

juangadiel commented Apr 25, 2024

Mautic Version

5.0.x series

Way of installing

Other (please specify if relevant in the bug report)

PHP version

8.2.18

What browsers are you seeing the problem on?

Chrome

What happened?

Way of installing: Gitpod from official Mautic repo on branch 5.x
Browser: Brave

Every time I try to open the default report “Downloads of all Assets” on a newly created Gitpod, I get the error "500 Internal Server Error - Key "id" for array with keys "referer, downloads" does not exist.". It is worth mentioning that the report has not been modified.

How can we reproduce this issue?

  1. Open a new Gitpod from https://github.com/mautic/mautic on branch 5.x
  2. Add an asset
    – Upload a local file (I tried with both .png and .jpg)
    – Do not alter/edit anything else and click on “Save & Close”
    – Copy the download URL
  3. Generate a lead by opening the download URL of the newly created asset in a new incognito window (I used Brave browser)
  4. Open the report “Downloads of all Assets”
    – A 500 Internal Server Error is thrown.

Relevant log output

[2024-04-25T20:05:16.233995+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "Key "id" for array with keys "referer, downloads" does not exist." at /var/www/html/app/bundles/ReportBundle/Resources/views/Graph/Table.html.twig line 24 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): Key \"id\" for array with keys \"referer, downloads\" does not exist. at /var/www/html/app/bundles/ReportBundle/Resources/views/Graph/Table.html.twig:24)
[stacktrace]
#0 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(94): twig_get_attribute(Object(Twig\\Environment), Object(Twig\\Source), Array, 'id', Array, 'array', false, false, false, 24)
#1 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_6dc8dc7973e69a95bc5db4f821bb7ab1->doDisplay(Array, Array)
#2 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling(Array, Array)
#3 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\\Template->display(Array)
#4 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\\Template->render(Array)
#5 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1347): Twig\\TemplateWrapper->render(Array)
#6 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(76): twig_include(Object(Twig\\Environment), Array, '@MauticReport/G...', Array)
#7 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_750277c492691af516671fa9a7454582->doDisplay(Array, Array)
#8 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling(Array, Array)
#9 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\\Template->display(Array)
#10 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\\Template->render(Array)
#11 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1347): Twig\\TemplateWrapper->render(Array)
#12 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(61): twig_include(Object(Twig\\Environment), Array, '@MauticReport/R...', Array, false)
#13 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_a9c7c3e888311bcb0ffe0568097e5fbf->doDisplay(Array, Array)
#14 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling(Array, Array)
#15 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\\Template->display(Array)
#16 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\\Template->render(Array)
#17 /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php(1347): Twig\\TemplateWrapper->render(Array)
#18 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(198): twig_include(Object(Twig\\Environment), Array, '@MauticReport/R...')
#19 /var/www/html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_d87c2908016285a2371406ca5f223443->block_content(Array, Array)
#20 /var/www/html/vendor/twig/twig/src/Template.php(243): Twig\\Template->displayBlock('content', Array, Array, true)
#21 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(66): Twig\\Template->renderBlock('content', Array, Array)
#22 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_274f4d32b0e34e384411d368c6082172->doDisplay(Array, Array)
#23 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling(Array, Array)
#24 /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()'d code(56): Twig\\Template->display(Array, Array)
#25 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_d87c2908016285a2371406ca5f223443->doDisplay(Array, Array)
#26 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling(Array, Array)
#27 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\\Template->display(Array)
#28 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\\Template->render(Array)
#29 /var/www/html/vendor/twig/twig/src/Environment.php(280): Twig\\TemplateWrapper->render(Array)
#30 /var/www/html/vendor/symfony/framework-bundle/Controller/AbstractController.php(258): Twig\\Environment->render('@MauticReport/R...', Array)
#31 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(334): Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController->renderView('@MauticReport/R...', Array)
#32 /var/www/html/app/bundles/CoreBundle/Controller/CommonController.php(157): Mautic\\CoreBundle\\Controller\\CommonController->ajaxAction(Object(Symfony\\Component\\HttpFoundation\\Request), Array)
#33 /var/www/html/app/bundles/ReportBundle/Controller/ReportController.php(656): Mautic\\CoreBundle\\Controller\\CommonController->delegateView(Array)
#34 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(163): Mautic\\ReportBundle\\Controller\\ReportController->viewAction(Object(Symfony\\Component\\HttpFoundation\\Request), '2', 1)
#35 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)
#36 /var/www/html/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#37 /var/www/html/app/AppKernel.php(109): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#38 /var/www/html/app/middlewares/CORSMiddleware.php(76): AppKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#39 /var/www/html/app/middlewares/HSTSMiddleware.php(39): Mautic\\Middleware\\CORSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#40 /var/www/html/app/middlewares/CatchExceptionMiddleware.php(28): Mautic\\Middleware\\HSTSMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#41 /var/www/html/app/middlewares/Dev/IpRestrictMiddleware.php(52): Mautic\\Middleware\\CatchExceptionMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#42 /var/www/html/app/middlewares/VersionCheckMiddleware.php(58): Mautic\\Middleware\\Dev\\IpRestrictMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#43 /var/www/html/app/middlewares/TrustMiddleware.php(42): Mautic\\Middleware\\VersionCheckMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#44 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\\Middleware\\TrustMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)
#45 /var/www/html/index.php(19): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
#46 {main}
"} {"hostname":"mautic-web","pid":4781}

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct




Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.

@juangadiel juangadiel added bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged labels Apr 25, 2024
@escopecz
Copy link
Sponsor Member

It was introduced in this change: https://github.com/mautic/mautic/pull/13597/files#r1580670957

@escopecz escopecz added regression A bug that broke something in the last release reports Anything related to reports and removed needs-triage For new issues/PRs that need to be triaged labels Apr 26, 2024
@escopecz escopecz added this to the 5.1.0 milestone Apr 26, 2024
@RCheesley
Copy link
Sponsor Member

@AlanWierzchonCA is working on a fix for this - thanks for reporting it @juangadiel 🚀

@AlanWierzchonCA
Copy link
Contributor

I'll deal with it this week.

@escopecz
Copy link
Sponsor Member

We should probably wait with releasing Mautic 5.1.0 for this bug fix.

@RCheesley RCheesley added the essential This must be done to close the milestone label Apr 29, 2024
@RCheesley
Copy link
Sponsor Member

@juangadiel please can you test #13708 as this should fix the bug! Thanks @AlanWierzchonCA 🚀

@RCheesley
Copy link
Sponsor Member

@all-contributors please add @juangadiel for bugs

Copy link
Contributor

@RCheesley

I've put up a pull request to add @juangadiel! 🎉

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If this issue is continuing with the lastest stable version of Mautic, please open a new issue that references this one.

@juangadiel juangadiel reopened this Apr 29, 2024
@juangadiel
Copy link
Author

@juangadiel please can you test #13708 as this should fix the bug! Thanks @AlanWierzchonCA 🚀

Sure thing, will do :)

@juangadiel
Copy link
Author

@juangadiel please can you test #13708 as this should fix the bug! Thanks @AlanWierzchonCA 🚀

I can confirm the PR #13708 fixes this bug.

image

@RCheesley
Copy link
Sponsor Member

Closing this as it's solved with #13708

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If this issue is continuing with the lastest stable version of Mautic, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs essential This must be done to close the milestone regression A bug that broke something in the last release reports Anything related to reports
Projects
None yet
Development

No branches or pull requests

4 participants