Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path and "general." included on all buttons (E.G. admin/settings/general.localization) and 500 error on localisation page #14976

Closed
2 tasks done
pwpbarney opened this issue Jun 26, 2024 · 13 comments

Comments

@pwpbarney
Copy link

pwpbarney commented Jun 26, 2024

Debug mode

Describe the bug

All the buttons are prepended with "general." and in some cases a path as well.
Localisation settings page errors out.
I upgraded from version 6.3.1 to 7.0.6 using docker.

Compose:

services:

  inventory:
    image: snipe/snipe-it:v7.0.6 #Old version: v6.3.1 Check backup before updating!!! \\domain\it\backup\inventory
    container_name: inventory
    env_file:
      - ./.env
    volumes:
      #Persist uploaded documents between docker down/up
      - "./uploads:/var/www/html/public/uploads"
      - "./private_uploads:/var/www/html/storage/private_uploads"
      #Do not manually create the SSL folder on the host. it messes up the permissions. instead let docker do it.
      - "./ssl:/var/lib/snipeit/ssl"
      - "./backup:/var/www/html/storage/app/backups"
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=web"
      - "traefik.http.routers.inventory.rule=Host(`it-inventory.domain.co.uk`)"
      - "traefik.http.routers.inventory.entrypoints=websecure"
      - "traefik.http.routers.inventory.tls.certresolver=myresolver"
      - "traefik.http.services.inventory.loadbalancer.server.port=80"
    networks:
      - web
      - database

networks:
  web:
    external: true
  database:
    external: true

.env:

# Mysql Parameters
MYSQL_PORT_3306_TCP_ADDR=db
MYSQL_PORT_3306_TCP_PORT=3306

MYSQL_DATABASE=snipeit
MYSQL_USER=snipeit
MYSQL_PASSWORD=password01


#Email Settings
# Email Parameters
# - the hostname/IP address of your mailservers
MAIL_PORT_587_TCP_ADDR=smtp.office365.com
#the port for the mailserver (probably 587, could be another)
MAIL_PORT_587_TCP_PORT=587
# the default from address, and from name for emails
[email protected]
[email protected]
MAIL_ENV_FROM_NAME='I.T. Inventory'
# - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
MAIL_ENV_ENCRYPTION=tls
# SMTP username and password
[email protected]
MAIL_ENV_PASSWORD=password


# Snipe-IT Settings
APP_ENV=production
APP_DEBUG=true
APP_KEY=base64:bV7zph7qDNau/_____________nSn3yn22f5cw=
APP_URL=https://it-inventory.domain.co.uk
APP_TIMEZONE=Europe/London
APP_LOCALE=en-GB

Reproduction steps

upgrade steps:

  1. change version tag in compose.
  2. docker compose pull
  3. docker compose up -d

Expected behavior

N/A

Screenshots

image

Snipe-IT Version

7.0.6

Operating System

docker installed on ubuntu

Web Server

docker

PHP Version

docker

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

[14:40:13] LOG.error: ErrorException: foreach() argument must be of type array|object, string given in /var/www/html/resources/macros/macros.php:18
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/html/resources/macros/macros.php(18): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php(123): Collective\Html\FormBuilder->{closure}()
#3 /var/www/html/vendor/laravelcollective/html/src/FormBuilder.php(1479): Collective\Html\FormBuilder->macroCall()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Collective\Html\FormBuilder->__call()
#5 /var/www/html/storage/framework/views/c194491a72496882c937042b0f735d54.php(51): Illuminate\Support\Facades\Facade::__callStatic()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(123): require('...')
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(124): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire()
#9 /var/www/html/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(69): Illuminate\View\Engines\PhpEngine->evaluatePath()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(72): Livewire\LivewireViewCompilerEngine->evaluatePath()
#11 /var/www/html/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Illuminate\View\Engines\CompilerEngine->get()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(207): Livewire\LivewireViewCompilerEngine->get()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\View\View->getContents()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\View\View->renderContents()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\View\View->render()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(918): Illuminate\Http\Response->__construct()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(885): Illuminate\Routing\Router::toResponse()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Router->prepareResponse()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#21 /var/www/html/app/Http/Middleware/CheckPermissions.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckPermissions->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(60): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\AuthenticateSession->handle()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Auth\Middleware\Authenticate->handle()
#27 /var/www/html/app/Http/Middleware/AssetCountForSidebar.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\AssetCountForSidebar->handle()
#29 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#31 /var/www/html/app/Http/Middleware/CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForTwoFactor->handle()
#33 /var/www/html/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckUserIsActivated->handle()
#35 /var/www/html/app/Http/Middleware/CheckLocale.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckLocale->handle()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->runRouteWithinStack()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->runRoute()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dispatchToRoute()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch()
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#50 /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\DisableBrowserCache->handle()
#52 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle()
#56 /var/www/html/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\PreventBackHistory->handle()
#58 /var/www/html/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\SecurityHeaders->handle()
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#63 /var/www/html/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForDebug->handle()
#65 /var/www/html/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForSetup->handle()
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle()
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#73 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#74 /var/www/html/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#75 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\NoSessionStore->handle()
#76 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#77 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then()
#78 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#79 /var/www/html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#80 {main}

Next Illuminate\View\ViewException: foreach() argument must be of type array|object, string given (View: /var/www/html/resources/views/settings/localization.blade.php) in /var/www/html/resources/macros/macros.php:18
Stack trace:
#0 /var/www/html/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(106): Illuminate\View\Engines\CompilerEngine->handleViewException()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(60): Livewire\LivewireViewCompilerEngine->handleViewException()
#2 /var/www/html/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(69): Illuminate\View\Engines\PhpEngine->evaluatePath()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(72): Livewire\LivewireViewCompilerEngine->evaluatePath()
#4 /var/www/html/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Illuminate\View\Engines\CompilerEngine->get()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(207): Livewire\LivewireViewCompilerEngine->get()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(190): Illuminate\View\View->getContents()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(159): Illuminate\View\View->renderContents()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\View\View->render()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(918): Illuminate\Http\Response->__construct()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(885): Illuminate\Routing\Router::toResponse()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Router->prepareResponse()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#14 /var/www/html/app/Http/Middleware/CheckPermissions.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckPermissions->handle()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(60): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\AuthenticateSession->handle()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Auth\Middleware\Authenticate->handle()
#20 /var/www/html/app/Http/Middleware/AssetCountForSidebar.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\AssetCountForSidebar->handle()
#22 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#24 /var/www/html/app/Http/Middleware/CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForTwoFactor->handle()
#26 /var/www/html/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckUserIsActivated->handle()
#28 /var/www/html/app/Http/Middleware/CheckLocale.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckLocale->handle()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->runRouteWithinStack()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->runRoute()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dispatchToRoute()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#43 /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\DisableBrowserCache->handle()
#45 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle()
#49 /var/www/html/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\PreventBackHistory->handle()
#51 /var/www/html/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\SecurityHeaders->handle()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#56 /var/www/html/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForDebug->handle()
#58 /var/www/html/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\CheckForSetup->handle()
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#67 /var/www/html/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\NoSessionStore->handle()
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then()
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#72 /var/www/html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#73 {main}
[14:40:13] LOG.error: foreach() argument must be of type array|object, string given {
    "view": {
        "view": "\/var\/www\/html\/resources\/views\/settings\/localization.blade.php",
        "data": []
    },
    "userId": 1,
    "exception": {}
}

Additional context

I've tried:

  • clearing browser cache
  • recreating the container
  • Running: composer dump-autoload; php artisan cache:clear; php artisan config:clear; php artisan route:clear; php artisan debugbar:clear; php artisan event:clear; php artisan view:clear; php artisan optimize:clear; php artisan clear-compiled
@mlongmiresqa
Copy link

mlongmiresqa commented Jun 26, 2024

I'm seeing a similar issue with the Action and Type columns. My admin page is fine though.

image
image

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

I think I know what happened here. In trying to solve one problem, we created another. :(

If you change your fallback language in your .env (FALLBACK_APP_LOCALE) to en, do you still see this issue?

@pwpbarney
Copy link
Author

No change for me.
image

@mlongmiresqa
Copy link

No change here either adding FALLBACK_APP_LOCALE

@symb1os1s
Copy link

symb1os1s commented Jun 26, 2024

My issue looks to be the same as @mlongmiresqa
My localization settings page is fine, but now every action in the logs has the "general." prefix.

This started appearing after I upgraded from v6.4.2 to v7.0.1. I'm now on v7.0.6.



I followed @snipe's suggestion. My .env already had APP_LOCALE=en. It didn’t have a FALLBACK_APP_LOCALE so I created that and set that to en as well, but no change after restarting the web server.

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

Thanks for that info - we’re working on this right now and should have a fix shortly

@coolnetgr
Copy link

By adding FALLBACK_APP_LOCALE=en-US on .env , the issue resolved for us at the activity report page.

@pwpbarney
Copy link
Author

FALLBACK_APP_LOCALE=en-GB worked for me. (buttons/labels and localisation page)

@snipe snipe reopened this Jun 27, 2024
@snipe
Copy link
Owner

snipe commented Jun 27, 2024

This is, unfortunately, part of a larger issue that we're working on. It has to do with how we handle language translations versus how package providers do. It's all technically correct, but not exactly compatible. We should have a fix out today for it all though. (Using that FALLBACK_LOCALE will solve the problem for a bunch of people, BUT if you use the backup notifications, those emails will arrive with stupid messages. (See #14917)

My attempt at fixing #14917 is partly what caused this issue. There's some underlying framework stuff at play here, but we're working on making a more reliable fix that will also play nicely with any additional package localizations we might end up using.

@myevit
Copy link

myevit commented Jun 27, 2024

Same issue in Email notifications and UI. Docker.
Screenshot 2024-06-27 at 8 29 09 AM

Screenshot 2024-06-27 at 8 29 53 AM
Screenshot 2024-06-27 at 8 30 16 AM

@snipe
Copy link
Owner

snipe commented Jun 27, 2024

As indicated by the merge commit, this fix is already on develop. Check your APP_LOCALE in your env and make sure you’re using the xx-XX version of your language and make sure you have a language set in your localization settings in Admin > Localization

@myevit
Copy link

myevit commented Jun 27, 2024

Confirming. APP_LOCALE was set to 'en'. Changing to 'en-US' fixed the issue. Thanks for the pointer

@symb1os1s
Copy link

symb1os1s commented Jun 27, 2024

Changing APP_LOCALE from 'en' to 'en-US' also fixed the issue for me.

@snipe snipe closed this as completed in 7dbceda Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants