-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
-
MOODLE_404_STABLE
We have a wiki on the front page. Only some members have the permission to edit the wiki pages but everybody, even non-logged-in guests, should be able to view the wiki pages. This works well for text-only pages but images are not shown. They are replaced by a white rectangle and if the image URL is opened directly (e.g. https://example.com/pluginfile.php/155/mod_wiki/attachments/6/image.jpg ) the user will be redirected to the login form.
I could track the problem down to the call of `require_login` in `wiki_pluginfile` in `mod/wiki/lib.php`.
If this line is removed, the image is shown. I think the line can be removed completeley, the files are already protected by `require_capability('mod/wiki:viewpage', $context);` some lines further down.
Henrik