Open AnastasiaKremenetskaya opened 3 years ago
why do you have different ports in .env and config?
I think DB issue could not be the cause of "asset not found" error. What is the full path of app.css in browser?
I don't have different ports. env('DB_PORT',3306),
means that if DB_PORT in env is empty then use default 3306 port.
Full path is http://localhost/assets/websitemanager/app.css
but you have 33060 port in your .env
Yes, that's why default 3306 port won't be used. 3306 is used only when DB_PORT in .env is empty, my DB_PORT is not empty.
Hi @AnastasiaKremenetskaya , I have same issue did you find a solution for that?
Hi @ehsantalkhouncheh No, forced to discard usage
Not sure if this applies to everyone using Docker but it definitely applies when installing Laravel for dev using Laravel Sail.
In vendor/hansschouten/phpagebuilder/src/Core/helpers.php
in the phpb_current_full_url() method the full URL is generated using SERVER['SERVER_NAME']
which in the case of these docker containers in windows and WSL2 (not sure about in mac OS) is generally 0.0.0.0.
Then in the phpb_current_relative_url() method the relative URL is generated using both the returned value from the above mentioned phpb_current_full_url() and the value in phpb_config('general.base_url');
which in most cases is probably http://localhost
.
Changing the ENV or config value for base_url doesn't solve the issue as redirects are sent to 0.0.0.0 then which breaks in the WSL2/Docker environment.
When using docker router not working as it should work. And shows Asset not found to all assets in package.
Above problems appear only when using PHPageBuilder with docker.
My .env
My config/pagebuilder