From 594dc0858b5960a21c5dd492a982ee4fddb979d5 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Thu, 23 Jan 2020 20:12:38 +0100 Subject: [PATCH] Make sure that Grocy.CurrentUrlRelative is set without the query string (fixes #509) --- changelog/55_UNRELEASED_2019-xx-xx.md | 1 + views/layout/default.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/55_UNRELEASED_2019-xx-xx.md b/changelog/55_UNRELEASED_2019-xx-xx.md index 6cac5ac3..73b30c94 100644 --- a/changelog/55_UNRELEASED_2019-xx-xx.md +++ b/changelog/55_UNRELEASED_2019-xx-xx.md @@ -16,6 +16,7 @@ - Fixed that entering partial amounts was not possible on the inventory page (only applies if the product option "Allow partial units in stock" is enabled) - Fixed that on purchase a wrong minimum amount was enforced for products with enabled tare weight handling in combination with different purchase/stock quantity units - Fixed that the productcard did not load correctly when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false` (thanks @kriddles) +- Fixed that the "Add as barcode to existing product" workflow did not work twice when not switching the page inbetween ### Shopping list fixes - Fixed that when `FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS` was set to `false`, the shopping list appeared empty after some actions diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index 3d70c80c..5656e415 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -50,7 +50,7 @@ Grocy.Components = { }; Grocy.Mode = '{{ GROCY_MODE }}'; Grocy.BaseUrl = '{{ $U('/') }}'; - Grocy.CurrentUrlRelative = "/" + window.location.toString().replace(Grocy.BaseUrl, ""); + Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, ""); Grocy.ActiveNav = '@yield('activeNav', '')'; Grocy.Culture = '{{ GROCY_CULTURE }}'; Grocy.Currency = '{{ GROCY_CURRENCY }}';