If you work with the form elements fileupload or mediafinder in combination with user admin roles ( Settings > Administrators ) you may end up with the following error while saving a model.
"A widget with class name 'ocmediamanager' has not been bound to the controller" on line 597 of /var/www/src/modules/backend/classes/Controller.php
In order to fix that, you must review the permissions of your admin user account for Upload and manage media contents – images, videos, sounds, documents. and select Allow or Inherit, depending on how you setup your roles.
After saving the permissions, you should be able to upload or select an image and save the model.
I recently started setting up a dockerized October CMS environment based on Alpine Linux, MariaDB and PHP-FPM which was actually a very straightforward process. However, for some reason the integrated image resizer didn’t create thumbnails of uploaded images.
Unfortunately there was nothing in the log files which could help me to identify the cause of the problem. After checking the file permissions, I decided to trace back the issue and found the reason in file vendor/october/rain/src/Database/Attach/Resizer.php.
The method getMimeType() returned always null, which broke the entire image manipulation process.
// Get the file extension
$this->extension = $file->guessExtension();
$this->mime = $file->getMimeType();
After a quick research I found out that getMimeType requires php_fileinfo which I simply forgot to set in my Dockerfile. After adding php7-fileinfo and rebuilding the container, the issue was finally fixed.
Today I successfully installed my first October CMS project locally via composer / command line. The installation was pretty straightforward and worked surprisingly well on my Alpine Linux docker container which includes NGINX, PHP-FPM and MariaDB.
- v1.0.1: First version of Demo
,,,. ,@@@@@@/@@, .oo8888o.
%&&%/ %&%%&&@@\ V /@@' `88\8 `/88'
`&%\ ` /%&' |.| \ '|8'
|o| | | | |
|.| | | | |
`========= INSTALLATION COMPLETE ========='
However, when I tried to open the front-end I got the following error.
PHP message: PHP Fatal error: Interface 'SessionHandlerInterface' not found in /var/www/src/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php on line 10
After a quick research I found the solution on Stackoverflow. I basically forgot to install the PHP extension php7-session inside my docker container. I manually installed the missing extension, but also updated my Dockerfile in case I have to rebuild my container.
bash-4.4# apk add php7-session
(1/1) Installing php7-session (7.1.33-r0)
OK: 291 MiB in 87 packages
After that I manually killed all PHP processes to make sure php-fpm loads the new extension with the next page reload.