Error showing when trying to edit course settings

Error showing when trying to edit course settings

by Adam Norwood -
Number of replies: 2

Hello there, I hope someone is able to help I'm tearing my hair out a bit on this one! 

I'm using Moodle 3.7 and when I go to a course and click the "edit settings" cog under "course administration" I am being greeted by the following rather large error I've attached. The main error I get (before I turn on developer error reporting) is

Can not create file "196086/user/draft/490019624/employability.png" 

The large portion of the error (shown in the attachment, to save space) seems to suggest it might be a postgres error but I'm not sure

Any help, even a nudge in the right direction, would be hugely appreciated. 

For the record we have already tried doing a postgres vacuum, reindex and turning zero damaged pages on. This unfortunately has not fixed the problem.

I would have tried to delete this image that's mentioned, but I can't find it!

Thank you in advance

Adam


Attachment Moodleerroreditcourse.JPG
Average of ratings: -
In reply to Adam Norwood

Re: Error showing when trying to edit course settings

by Ken Task -
Picture of Particularly helpful Moodlers

Ownerships/permissions on moodledata/filedir/*?
Says cannot create stored file.
Also timecreatted shows an epoch time stamp of
148xxxxxxxx ... many moons ago.

Is file really there?   Could try giving moodle what it seeks ...

Query for MySQL ...

select contenthash,filename from mdl_files where filename="employability.png"

Contenthash is location of file in moodledata/filedir/

Looks like a0b3q;fdnadlfjsdlsdrhek32lsls

The file should be located in moodledata/filedir/a0/b3/ and inside there
a0b3q;fdnadlfjsdlsdrhek32lsls

Give moodle what it is seeking ...

via linux command line:

cd /pathto/moodledata/filedir/
As per example, is directory a0 present?  If not make one.
cd a0
ls directory 'b3' present?  if not make one.
cd b3
touch a0b3q;fdnadlfjsdlsdrhek32lsls - creates an empty file - 0 bytes.
make sure a0/b3/ ownerships/permissions are readable by web servcie.

'SoS', Ken

In reply to Ken Task

Re: Error showing when trying to edit course settings

by Adam Norwood -
Hi Ken,

Thank you very much for the suggestion, as it turns out the zero paging/reindexing/vaccuuming operation in Postgresql was the solution, but when I had run it initially it had ran into some hard-to-find errors which gave me the impression of it not working. Once these operations were allowed to complete the issue was resolved

Thanks again

All the best

Adam