Not a bug Container only, can still add media...

Steve F

Well-known member
Affected version
2.0
If a category is set as container only you're still able to upload/embed media. Not real familiar with XFMG but is this a admin only thing?

Also, I could still create an album though that isn't a selected option in the category since it is container only.
 
What are the steps to reproduce this, exactly?

We have a container only category here, which is this one:
https://xenforo.com/community/media/categories/test-media.9/

The Add media button appears there, but it merely asks you which category you'd like to add media to. "Test media" is greyed out and has the message "You can not add media to container categories."

If I go to what would be the direct URL for adding media to that category:
https://xenforo.com/community/media/categories/test-media.9/add

I get a message "You do not have permission to view this page or perform this action.".

So, essentially, if you were able to add media or an album to it, then it must have not been a container only category as far as I can tell.
 
First I think I was confused so we’ll likely be able to mark this not a bug. ;)

What I had done was create a personal album from within the container only category select menu which is then seen as new media even in category view. So what I thought was it added a album to that category which isn’t the case. Sorry it was late and not a lot of experience with XFMG made me believe that was a 🐜.

Though one thing, in the category view it shows Album stats although the child is Media only. Is this correct?
 
Phew :)

Though one thing, in the category view it shows Album stats although the child is Media only. Is this correct?
It is correct. A category can also have any category type as its children so although you might be looking at a list of categories and the top level one is media only, there's nothing to say that it can't have child categories which are album only, etc.

Though we did talk about hiding that stat if it's zero, which is probably reasonable. Though at the same time we probably wouldn't want to hide "Media items 0" and "Comments 0" because then you've got the stats all moving around which might seem odd. Yeah I think we'll just hide the Albums one.
 
Top Bottom