H2CK/webtrees

ErrorException: file(/var/www/html/app/../resources/lang/de/messages.po): failed to open stream: No such file or directory in /var/www/html/vendor/fisharebest/localization/src/Translation.php:56

xXZaretXx opened this issue · 5 comments

Hello ;)
now i have another error. I don't know if i could change something
i used the latest container image.
This exception is displayed in the browser if i tried to open the website

ErrorException: file(/var/www/html/app/../resources/lang/de/messages.po): failed to open stream: No such file or directory in /var/www/html/vendor/fisharebest/localization/src/Translation.php:56
Stack trace:
#0 [internal function]: Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(2, 'file(/var/www/h...', '/var/www/html/v...', 56, Array)
#1 /var/www/html/vendor/fisharebest/localization/src/Translation.php(56): file('/var/www/html/a...')
#2 /var/www/html/app/I18N.php(306): Fisharebest\Localization\Translation->__construct('/var/www/html/a...')
#3 /var/www/html/app/Http/Middleware/UseLanguage.php(67): Fisharebest\Webtrees\I18N::init('de')
#4 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#5 /var/www/html/app/Http/Middleware/UseSession.php(71): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#6 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#7 /var/www/html/app/Http/Middleware/UpdateDatabaseSchema.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#8 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#9 /var/www/html/app/Http/Middleware/UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#10 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#11 /var/www/html/app/Http/Middleware/UseDatabase.php(117): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#12 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#13 /var/www/html/app/Http/Middleware/BadBotBlocker.php(212): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#14 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#15 /var/www/html/app/Http/Middleware/RegisterFactories.php(72): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#16 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterFactories->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#17 /var/www/html/vendor/middlewares/client-ip/src/ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#18 /var/www/html/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#19 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#20 /var/www/html/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#21 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#22 /var/www/html/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#23 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#24 /var/www/html/app/Http/Middleware/ReadConfigIni.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#25 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#26 /var/www/html/app/Http/Middleware/SecurityHeaders.php(47): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#27 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#28 /var/www/html/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#29 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#30 /var/www/html/app/Http/Middleware/PhpEnvironment.php(49): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#31 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\PhpEnvironment->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#32 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#33 /var/www/html/index.php(57): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#34 {main}
H2CK commented

Could you please provide the command how you start the container?
Important is which environment variables are set by you.
Do not provide any credentials.

I need this information to analyze the problem further. I am running the container on my own and have not seen this error before.

Yes no problem.

the command is :
docker run -d -p 8088:8079 --name webtrees -v webtree:/var/www/html/data -e PORT=8079 -e DB_USER=root -e DB_PASSWORD=***** -e DB_HOST=172.18.0.3 --network=webtree --restart always dtjs48jkt/webtrees

The db host is a latest maria db docker container .
i suppose the bug is dependet on the german language directory?

H2CK commented

Ok. I can reproduce this error with Webtrees 2.0.9. Locally I will rollback to 2.0.8 to check if the error was introduced with Webtrees 2.0.9

H2CK commented

I found the problem. It should be fixed with Pull Request #28

You should find version v2.0.9-2 in some time on docker hub.

Thank you for your contribution.

H2CK commented

Version v2.0.9-2 is available which fixes the problem.