Fixed Unable to add media unless member already has an album

Affected version

Mr Lucky

Well-known member
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.


Well-known member
Are you able to recreate the issue with a test account in the same usergroups? Did you analyze permissions?

Mr Lucky

Well-known member
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:

Mr Lucky

Well-known member
Any news on this, new members who have not already created albums but do have permissions, are beginning to complain.

Chris D

XenForo developer
Staff member
This is fixed now for the next release.

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