From 3cf8ebeb893c0ce939578d2152bf58e89a84a873 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Thu, 2 May 2019 21:33:59 +0200 Subject: [PATCH] Fixed product picker workflow URLs were wrong when running grocy in a subdirectory and with disabled URL rewriting (again fixes #219) --- views/layout/default.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index 8b210c6b..0b8033e2 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -48,7 +48,7 @@ Grocy.Components = { }; Grocy.Mode = '{{ GROCY_MODE }}'; Grocy.BaseUrl = '{{ $U('/') }}'; - Grocy.CurrentUrlRelative = window.location.pathname.replace(Grocy.BaseUrl, ""); + Grocy.CurrentUrlRelative = "/" + window.location.toString().replace(Grocy.BaseUrl, ""); Grocy.ActiveNav = '@yield('activeNav', '')'; Grocy.Culture = '{{ GROCY_CULTURE }}'; Grocy.Currency = '{{ GROCY_CURRENCY }}';