Error after installing barryvdh (PHP debug bar for Laravel)

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
daybyday
Posts: 4
Joined: 23 Jun 2022, 09:29

Error after installing barryvdh (PHP debug bar for Laravel)

Post by daybyday » 28 Jun 2022, 16:32

My environment:
Mac / PHP 8.1.4 / Aimeos 2022.04

After installing barryvdh (a PHP debug bar for Laravel), I can see the following errors as attached ("APP_DEBUG=true" in ".ENV"):
Picture1.jpg
Picture1.jpg (193.28 KiB) Viewed 1203 times
1. The product images cannot be downloaded.
2. The debug bar is not shown properly. (The console log shows some clue about it, but I don't understand what they mean. I need a help on this! FYI, on login/register pages, I can see the debug bar properly.)

Thank you in advance!

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Error after installing barryvdh (PHP debug bar for Laravel)

Post by aimeos » 29 Jun 2022, 07:00

The DebugBar implementation uses inline Javascript, which conflicts with the strict Content Security Policy in the Aimeos base Blade template. We've changed that so the CSP is only applied in non-debug mode and you can test yourself by executing:

Code: Select all

composer req aimeos/aimeos-laravel:2022.04.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

daybyday
Posts: 4
Joined: 23 Jun 2022, 09:29

Re: Error after installing barryvdh (PHP debug bar for Laravel)

Post by daybyday » 30 Jun 2022, 09:18

Thank you for your help! I've tried to run your command in the terminal but I've got this error message:

There are no commands defined in the "aimeos/aimeos-laravel" namespace.

Could you let me know what's worng with it?

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Error after installing barryvdh (PHP debug bar for Laravel)

Post by aimeos » 30 Jun 2022, 09:35

Sorry, it must be:

Code: Select all

composer req aimeos/aimeos-laravel:2022.04.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

daybyday
Posts: 4
Joined: 23 Jun 2022, 09:29

Re: Error after installing barryvdh (PHP debug bar for Laravel)

Post by daybyday » 30 Jun 2022, 14:46

It works now! Thank you!

Post Reply