We had our moodle site (moodle 3.2) installed on an Ubuntu, the DB was on the same server. We decided to start a new student year on a new system - installed Moodle 3.4 on a CentOS, the (test) DB was still on the same server.
We then put the production server into maintenance mode, shut it down, migrated the (production) DB onto a dedicated DB server, copied some parts of the moodledata folder (images, videos) and linked our "new" moodle with our "old" DB which was now on it's own server. With minor changes (updated some plugins, deleted some others...) it worked fine. While still on "localhost" we tested if all the data was OK, users, courses, appearance... All worked great!
Then, we put the now "new" moodle into production, still in maintenance mode - set up config.php from localhost to https://our.moodle.website, set up certificates, aliases, redirects... The whole package.
All seemed to work fine, except a couple of things, which I can't seem to fix.
There are some images, which are not showing. They were inserted still on the old moodle, from the "/var/moodledata/repository/pictures" folder. That's where we keep all images/badges/icons, like question marks, info icons and similar files. We use the Essential theme.
We kept all the paths and file ownerships the same as with the "old" server. The only exception I can think of, is that the owner of moodledata on the old Ubuntu server was "www-data", and now, it's "apache".
Here is an example of abroken image:
In courses, we use Grid format, where some of the Sections have images, and some don't. In the courses, where the sections do have images on them, I get an error:
Cannot convert uploaded image to displayed image. Please report error details and the information contained in the php.log file to developer.
Error code: cannotconvertuploadedimagetodisplayedimage
- line 482 of /lib/setuplib.php: moodle_exception thrown
- line 2147 of /course/format/grid/lib.php: call to print_error()
- line 848 of /course/format/grid/renderer.php: call to format_grid->setup_displayed_image()
- line 391 of /course/format/grid/renderer.php: call to format_grid_renderer->make_block_icon_topics()
- line 249 of /course/format/grid/format.php: call to format_grid_renderer->print_multiple_section_page()
- line 280 of /course/view.php: call to require()
And if I try to edit a course, a label, or whatever, and decide to insert an image through FilePicker, i see the thumbnail of a specific file type for half a second, after that, it gets broken as well. I managed to take a printscreen in the exact moment, in which the images are starting to get broken. 1/10 of a second later, all thumbnails were broken.
After I insert any of these images in the label (or whatever I'm editing), it shows normally. The thing is, that if I right click on the image and "Inspect element", i get the URL "". After pasting that URL in a browser, the image is shown.
If I do the same with any of the broken images from the "old" moodle and paste that URL in a browser, the browser doesn't show the image, but offers to download and open/save it, AND the size is 0B! After choosing to open, IrfanView reports an error.
So, any ideas on what to do to:
- make the "old" inserted images (URL's of type ) visible again
- make image type thumbnails in FilePicker not broken
- fix the "Cannot convert uploaded image to displayed image" error in some courses
Any ideas would be appreciated! Thank you!