Drush

The symptom was that the frontpage which only contained the default node view was empty. The nodes themselves were working, all the other parts of the website like main menu, footer etc too.
The problem was related to permission issues with drush. Those showed when executing

ddev drush cr

failed with a respective error.

The way to fix this fast, is:

rm -rf vendor 
ddev composer install

 

Tags

Sometimes drush cr does not work. A possible root for the issue could be the shebang

Check the shebang to confirm if the ^M is there:

ddev exec bash -lc 'head -1 vendor/bin/drush | cat -A' 

You should now see:

#!/usr/bin/env php$

If it shows ^M at the end, use Perl to convert CRLF → LF for the wrapper and make it executable:

ddev exec bash -lc "perl -pi -e 's/\r\n/\n/g' vendor/bin/drush && chmod +x vendor/

Tags