contentacms/contenta_jsonapi

White background after installation, css not being loaded.

hyperfocus1337 opened this issue · 2 comments

My contenta installation finishes with white background because css stylesheets weren't loaded.

2019-02-08_15-40

Errors in console:

Refused to apply style from 'http://cms.com/?0' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Refused to execute script from 'http://cms.com/' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to apply style from 'http://cms.com/?0' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Local machine reproduction steps.

Download install script
php -r "readfile('https://raw.githubusercontent.com/contentacms/contenta_jsonapi/8.x-2.x/installer.sh');" > contentacms-quick-installer.sh

Give permissions and run: chmod a+x download-contentacms.sh

Install contenta./download-contentacms.sh contenta

Enter directory: cd contenta

Populate your .env.local file with the following environment variables:

SITE_NAME='Contenta CMS'
SITE_MAIL=site@email.com
ACCOUNT_MAIL=site@email.com
ACCOUNT_NAME=user
ACCOUNT_PASS=password
MYSQL_DATABASE=databasename
MYSQL_HOSTNAME=172.16.240.40
MYSQL_PORT=3306
MYSQL_USER=user
MYSQL_PASSWORD=password

Run your docker containers (setup with your containers): docker-compose up -d

Enter your development domain in hosts file: sudo nano /etc/hosts

Enter php container and install contenta: composer run-script install:with-mysql

In my case contenta install failed with keys error, check issue #347.

Resolve error by running: sudo chmod 660 -R keys

Refresh or delete database and reinstall with previously mentioned composer command.

Errors should be visible in console.

Issue somehow resolved itself.

That wasn't helpful :/