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

Fatal error, directory public does not exist #113

Open
Seda145 opened this issue Jan 28, 2022 · 3 comments
Open

Fatal error, directory public does not exist #113

Seda145 opened this issue Jan 28, 2022 · 3 comments

Comments

@Seda145
Copy link

Seda145 commented Jan 28, 2022

After uploading the website to the server, Bolt does not handle the public folder properly which was "public" on the local machine and is "public_html" on the server. clearing cache makes no difference. What am I looking at?

Backend fatal error: PHP Fatal error: Uncaught Exception: The directory "/home//domains/website.com/public/theme/ThemeName" does not exist. in /home//domains/website.com/vendor/php-translation/symfony-bundle/DependencyInjection/Configuration.php:131\nStack trace:\n#0 /home//domains/website.com/vendor/symfony/config/Definition/Builder/ExprBuilder.php(239): Translation\Bundle\DependencyInjection\Configuration->Translation\Bundle\DependencyInjection\{closure}('/home/...')\n#1 /home//domains/website.com/vendor/symfony/config/Definition/BaseNode.php(461): Symfony\Component\Config\Definition\Builder\ExprBuilder::Symfony\Component\Config\Definition\Builder\{closure}('/home/...')\n#2 /home//domains/website.com/vendor/symfony/config/Definition/PrototypedArrayNode.php(177): Symfony\Component\Config\Definition\BaseNode->finalize('/home/...')\n#3 /home//domains/website.com/vendor/symfony/config/Definition/BaseNo in /home//domains/website.com/vendor/symfony/config/Definition/BaseNode.php on line 469\n

@Seda145
Copy link
Author

Seda145 commented Jan 28, 2022

Actually, it doesn't even work right after installing bolt through composer, if you change the directory name right after bolt:setup to "public_html", you get this:

In BaseNode.php line 469:
Invalid configuration for path "translation.configs.site.dirs.0": The directory "K:/publictestwebsite/public/theme/base-2021" does not exist.

In Configuration.php line 131:
The directory "K:/publictestwebsite/public/theme/base-2021" does not exist.

Isn't Kernel::getPublicFolder() supposed to handle this?

@bobdenotter
Copy link
Member

I don't think that's supported currently. It'd be a nice feature, if we could add support for that, though.

@Seda145
Copy link
Author

Seda145 commented Feb 1, 2022

Ah ok, after scanning the source I thought I ran into some kind of bug at first because there does seem to be a partial implementation of this in Bolt. The public folder's name is even stored in the cache. In the end I used a symbolic link to keep both Bolt and the server happy with the name of the public folder.

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

2 participants