Class not found in AbstractFactory

Today I had some trouble with removing a module on Magento2 and its custom product attributes. After removing the code of Mageplaza_Seo I was not able to edit products, categories or even checkout anymore.

The reason was an attribute called mp_meta_robots which was still pointing to the class \Mageplaza\Seo\Model\Source\Robots. I found the attribute by checking the table eav_attribute as follows.

Removing this via backend or MySQL has fixed the problem.

Nginx and Cached CSS / JS files

Yesterday I had a pretty hard time with cached CSS / JS files on my developer environment. I supposed to review layout changes, but I always got the old CSS files. I have spent about 2 hours to find the reason. At the end the solution was to turn off the syscall sendfile in my virtual host configuration.

If you use Nginx as a reverse proxy to serve pages from an application server, you can leave sendfile turned off.

 

Reload Nginx Inside Docker Container

I am using docker for Nginx which is running with multiple virtual hosts. Sometimes I have to reload my updated nginx configurations, but I don’t want restart the container each time. Here is how you can reload your nginx without any downtime and without interrupting any connections.

1. Find your container name

Use docker ps to find your nginx container.

2. Reload Nginx

With docker exec -it {container_name} {command} you can directly access your container and execute commands. In my case the name of the container is nginx-server.