Common Problems
Obsolete page
This page requires updating for UserFrosting 6. You can help by contributing on GitHub.
Installation
I get a Node/npm error when running php bakery bake.
If installation of npm dependencies fails, see npm to ensure npm is correctly installed and updated. You may need to change npm permissions.
An exception has been thrown during the rendering of a template
When trying to view your site you get an error similar to this :
An exception has been thrown during the rendering of a template ("The asset 'vendor/font-awesome/css/font-awesome.css' could not be found. Referenced in '/home/vagrant/userfrosting/app/sprinkles/core/asset-bundles.json [css/main]'.").
This is an indication that asset build failed or you missed a step in the installation process. Try running the installer again with php bakery bake and check for any error messages.
Installation went fine, except I don't see any styling on my home page. I am using Apache.
UserFrosting uses a dynamic routing system for serving assets in a development environment. For this to work on an Apache webserver, mod_rewrite needs to be enabled, and you need to give Apache permission to use the .htaccess file in public/.
Enabling mod_rewrite
If you have shell access to your server, please take the following steps (from Stack Overflow):
- Open up your console and type into it:
sudo a2enmod rewrite - Restart your apache server:
sudo service apache2 restart
If this still does not work, you may need to change the override rule in your Apache configuration to allow Apache to use UserFrosting's .htaccess file.
Enabling .htaccess
- Locate either your site-specific virtualhost file (preferred) or your master Apache configuration file (typically called
apache2.conf,http.conf, or000-default.conf). In XAMPP, for example, this file is located atXAMPP/etc/httpd.conf. - Locate the line
Directory /var/www/ - Change
Override NonetoOverride All - Restart Apache.
You may need a server admin to do this if you are using shared hosting.
If you get an error stating rewrite module is not found, then your userdir module is probably not enabled. To enable it:
- Type this into the console:
sudo a2enmod userdir - Enable the rewrite module (per the instructions above).
For more information, see this blog article.
Deployment/Production
My routes don't seem to work when I switch to UF_MODE='production'.
The production mode, by default, enables route caching. This can result in route definitions not being updated in the cache during production. To resolve this, you should clear the route cache in app/cache/routes.cache.