This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

forums7529
forums7529

Hello,

I'm getting the above exception thrown when trying to upload a file using the new Media Library and when uploading a new avatar image for the logged in Admin.

I tried changing line 74 of \vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php to the following, but it made no difference.

return file_put_contents($path, $contents, $lock ? LOCK_SH : 0);

Everything else is working file.

If someone could please suggest a way of fixing this issue, I'd be most grateful.

asbig
asbig

Hi,

My hosting provider doesn't allow exclusive locks either!

I ignored the ternary operator all together for the same function as you and just replaced it with a zero (false):

public function put($path, $contents, $lock = false)
{
    return file_put_contents($path, $contents, 0);
}

This worked for me but I have to remember to do this each time I update to the latest build!

I don't think exclusive locks should even be used here but this is a Laravel issue not October CMS if anything.

Good luck.

forums7529
forums7529

Hi asbig, Many thanks indeed for your reply, but I just tried your suggestion and it still throws the same exception whilst either using the new Media Library facility or change the logged in Admin's avatar.

I completely agree that it's a Laravel issue and a very annoying one at that.

Thanks again.

asbig
asbig

Hi forums752, sorry that didn't work for you .

I just changed my admin Avatar image on a hosted site that doesn't allow exclusive locks and it worked okay using the fix.

Have you tried searching for LOCK_EX in all the files you have in your installation?

Best, asbig.

forums7529
forums7529

Hi asbig,

Yes, I tried that very thing. No difference.

Thanks for the suggestion.

Last updated

forums7529
forums7529

Hi asbig,

May I just ask you one question please ?

Could you please confirm whether you have the WYSIWYG plugin installed ?

Many thanks

forums7529
forums7529

Turned out there were two more references that needed changing

plugins\anandpatel\wysiwygeditors\vendor\league\flysystem\src\Adapter\Local.php

Lines 77 and 146

asbig
asbig

Hi forums7529,

Did you sort this out?

I do have the wysiwygeditors plugin installed but it didn't give me a problem.

forums7529
forums7529

Hi asbig,

Yes, thank you very much.

As you suggested earlier, there were several places where I needed to change the code.

e.g.

plugins\anandpatel\wysiwygeditors\vendor\league\flysystem\src\Adapter\Local.php

Lines 77 and 146

Glad I resolved the problem but it's a real pain to have to do every time I do an an update.

Many thanks again for your help :-)

Last updated

1-9 of 9

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.