Problem after installation
-
After installing AsgardCMS which runs correctly, when I try to enter the backend I get a message
ErrorException (E_ERROR)
Undefined variable: alternate (View: /Users/asqard/www/strona/Themes/Flatly/views/layouts/master.blade.php) (View: /Users/asqard/www/strona/Themes/Flatly/views/layouts/master.blade.php)
Previous exceptionsUndefined variable: alternate (View: /Users/asqard/www/strona/Themes/Flatly/views/layouts/master.blade.php) (0) Undefined variable: alternate (0)
I already tried to download the platform straight from GitHub but it did not help
My working environment is OSX, MAMP5 PHP 7.2
-
Hello, you can try changing the address from www.xxxx.com/backend to www.xxxx.com/en/backend.
-
In Themes/Flatly/layouts/master.blade.php in head, add a simple isset to alternate variable.
Old code:
@foreach($alternate as $alternateLocale=>$alternateSlug)
<link rel="alternate" hreflang="{{$alternateLocale}}" href="{{url($alternateLocale.'/'.$alternateSlug)}}">
@endforeachNew Code:
@if(isset($alternate))
@foreach($alternate as $alternateLocale=>$alternateSlug)
<link rel="alternate" hreflang="{{$alternateLocale}}" href="{{url($alternateLocale.'/'.$alternateSlug)}}">
@endforeach
@endif