“Authentication is required to continue” when loading Authentication component

If you use cakedc/users or cakephp/authentication and want to programmatically log in a newly created user, you will have to use setIdentity() on Authentication component, and for that you will have to load it into your controller. But if you do it wrong, you will get this error: Authentication is required to continue Authentication\Authenticator\UnauthenticatedException To… Continue reading “Authentication is required to continue” when loading Authentication component

Deploying a Node.JS application to Azure Web App Service

If you deployed your Node.JS app to Azure and you can’t get it to run, a common gotcha is the port number your app is listening on. When troubleshooting, you may be reading that Azure allows incoming connections only to ports 80 and 443. So you make your app listen to 80 or 443, but… Continue reading Deploying a Node.JS application to Azure Web App Service

Certbot deploy-hook command not found

If you want certbot-auto to reload nginx after issuing or renewing a certificate, you may want to use –deploy-hook. But if you put the plain service nginx reload there, it may actually fail to renew, and you would get the following error in your /var/log/letsencrypt/letsencrypt.log: deploy-hook command "service nginx reload" returned error code 127 Error… Continue reading Certbot deploy-hook command not found

CRUD View: _getIndexTitleField() must be of type string, array returned

Setup You’re using CakePHP with CRUD plugin installed. You baked some models from the database. Problem You visit the index page for a given model and you get the following error: CrudView\Listener\ViewListener::_getIndexTitleField(): Return value must be of type string, array returned Solution Make sure the model has a display field. You can always try using… Continue reading CRUD View: _getIndexTitleField() must be of type string, array returned