Images have disappeared Moodle 3.3

Images have disappeared Moodle 3.3

by Peter Masters -
Number of replies: 6

I'm using Moodle 3.3.

I had uploaded numerous images and have been displaying fine for 2 months, but yesterday they stopped displaying. The files are still in the repository but no longer displaying. Nor is the user's picture. No images are displaying anymore.

expatuniprep.com

Can someone assist me, in relatively basic (layman's) terms, please?

Thanks
Pete


Average of ratings: -
In reply to Peter Masters

Re: Images have disappeared Moodle 3.3

by S. kavita -
Picture of Testers

Hi Peter,

Have you changed the path of the moodle folder or directory??

Please check  "Convert URLs into links and images" in: Site Administration> Plugins> FILTERS> MANAGE FILTERS is enabled or not. If it is not enabled then enabled it and check.


If you still face the issue then please give more information like which version of Moodle your are using and any changes/updates that you have made recently.


Thanks.

In reply to S. kavita

Re: Images have disappeared Moodle 3.3

by Peter Masters -

Yes,  "Convert URLs into links and images" is enabled.

I using version 3.3

I don't remember making any changes, though I had been going through plugins because some of the videos were showing error playing messages. I changed 'Multimedia plugins' to 'off, but available'  but changed it back to 'on' soon after.

I've been searching for a 'fix' but with no luck. In fact, I'm quite prepared to pay someone to fix this. I suggested to my school yesterday that we hire a Moodle consultant as I'm certainly not one. 

Thanks

Pete

In reply to Peter Masters

Re: Images have disappeared Moodle 3.3

by Peter Masters -

This is one of the image links for an that has vanished:



In reply to Peter Masters

Re: Images have disappeared Moodle 3.3

by S. kavita -
Picture of Testers

Hi Peter,

From the above screenshot I can view the URL in which there is "draftfile.php". SO I found its solution in Moodle forum posted by somebody and here it is:

hi, I've been fighting this problem for a while now.

after some serious digging, I realized that the filepicker wasn't returning the full url, only the relative one.

So I made this change to filelib.php approximately line 752, begining of function "file_rewrite_urls_to_pluginfile", you'll see  $wwwroot = $CFG->wwwroot;

I changed it to

    $wwwroot = parse_url($CFG->wwwroot,PHP_URL_PATH);
    $text = str_ireplace("$CFG->wwwroot", "$wwwroot", $text);

And now the function and my images/files show up as they should.

Let me know if this helped any of you out, or if there is a better way to achieve what my fix did!


Have a look at this, I think this will help you out. 



In reply to S. kavita

Re: Images have disappeared Moodle 3.3

by Peter Masters -

Thank you for your replies!

To be truthful, my frustration and time restraints led me to contact an online Moodle consultant i.e. 'pay for the fix'. She solved this problem and my video issue in a few hours. 

Thank you again.

Pete