Fixed Unable to add media unless member already has an album

Mr Lucky

Well-known member
Affected version
2.0.2
A member who has permissions to add media, but has not yet created an album, gets an error message when clicking on Add media button. Other members with same usergroups can add media into an existing album

We ran into some problems.

You do not have permission to view this page or perform this action.
 
Yes I analayzed permissions, the test user has correct permissions.

With a test user I could upload media to his album.

Then as admin I deleted that test user's album, and then the test user was no longer able to uploaod, and got the error message as above.

(This was the same parmissions as the user who reported te problem, who had not yet created an album)

Users who already have an album have no problems uploading to their albums.
 
Last edited:
Any news on this, new members who have not already created albums but do have permissions, are beginning to complain.
 
This is fixed now for the next release.

To fix now, open the file src/addons/XFMG/Pub/Controller/Media.php and find:
PHP:
if (!$categoryAddTree->count() && !$canAddToAlbums)
And change that to:
PHP:
if (!$categoryAddTree->count() && !$canAddToAlbums && !($visitor->canCreateAlbum() && $this->options()->xfmgAllowPersonalAlbums))
 
Back
Top Bottom