Missing admin submenus
-
Hi
I'm having trouble using the admin on a fresh install, the submenus are not displayed, the routes however work. Where to start troubleshooting this?No errors are shown in the browser console or the server log.
The configure menu on the other hand, is working as expected.
-
Hi @fmora
Let me know Have you done any changes in the code???
else
try the following commands mentioned below:-composer dump-autoload
php artisan config:cache
php artisan config:clear
-
Hi @Vaishali-Agarwal , thank you for your help.
I've tried your suggestions and the problem still persist.
This made me realize though, that the only modification I've done to my code could be causing this (app/Providers/AppServiceProvider.php):public function boot() { Schema::defaultStringLength(191); if (\App::environment('production')) { \URL::forceScheme('https'); } }
If I remove the
forceScheme
bit, the menus are displayed, but no style or JS are loaded due to mixed content errors on the browser.So my question is now, Is there any better approach to enable https?
-
don't need to use forceScheme for https.
Just mention the https in APP_URL in .env fileThanks
-
@Vaishali-Agarwal
My .env had already the correct scheme.I had an issue on the web server configuration, my app is behind a proxy that routed the requests using http internally, ended up handling SSL on the app server configuration as well.
It is working now.Thank you for your help.
-
@fmora Can you describe how did you fix this issue ?
I"m using Docker and Traefik for routing and ssl. I'm having the same issue.
I think it might be same reason since I'm using traefik as reverse-proxy.
-
Figure out a way. Writing up here for future reference.
Step 1 - In boot() method of AppServiceProvider (app/Providers/AppServiceProvider.php), use this
$this->app['request']->server->set('HTTPS', true);
instead of this
\URL::forceScheme('https');
Once you do this, admin submenu will appear. However, it might break other stuffs like assets. If that happen do Step #2.
Step 2 - Use secure_asset instead of asset in Blade and theme files.
-
Hello @Hein!
I have the same environment (bagisto with docker) and I'm trying to install letsencrypt using traefik. But I am not very familiar with letsencrypt and neither with traefik version 2.2. Could you tell me how you implemented SSL for bagisto? I would appreciate it very much. -
Hi @William-Hatanaka
userguide is here https://bagisto.com/en/configure-ssl-for-tenant-domain-in-multi-tenant-saas-ecommerce-module/ if you want to setup SSL using Let's encrypt. -
Thank you @Vaishali-Agarwal
But I am using docker version of Bagisto.
So, is there a tutorial to install SSL using traefik or similar to Bagisto-with-Docker?
Thank you -
@William-Hatanaka said in Missing admin submenus:
SSL using traefik
Currently we don't have any tutorial on traefik, still by searching more on google here is the guide which might help you https://docs.traefik.io/v1.7/user-guide/docker-and-lets-encrypt/