• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Can't fix non-breaking space code in add media category filter

Martok

Well-known member
#1
I first noticed this in XFMG 1.1.2 and it is still occurring in 1.1.3.

On my site, if I go to add media, then type "n", "b", "s" or "p" I get the non-breaking space code &nbsp appearing in front of most of my categories
upload_2015-12-14_15-47-5.png

There are a small number of categories that don't have &nbsp in front of them:

upload_2015-12-14_15-54-34.png

I've disabled all add-ons except XFMG and tested in an unedited default style and get the same results.

Initially I thought it was categories with a space in the title but that's not the case as Warframe and Destiny don't, plus TV & Movies is also fine.

I have edited some categories that have &nbsp in front just to ensure that I hadn't added a space in front (I hadn't). Editing didn't make any difference.

The issue isn't appearing in the add media album filter.

I'm unsure what the issue is, whether it's a bug or something else. I cannot reproduce it in the Media Gallery here on XenForo.
 

Mike

XenForo developer
Staff member
#2
Are the categories getting this all sub-categories? At a glance it looks like it. If so, I think that would be a bug, though I'm not positive we can workaround it.
 

Chris D

XenForo developer
Staff member
#4
This is a bug in the Chosen library. Actually a regression, was fixed in version 1.2.0 but seems to have resurfaced recently.

Unfortunately their development seems to have slowed somewhat. There have been a few solutions proposed but not sure they are ideal for us to implement ourselves.

We could look at a solution and submit a pull request, I guess.
 

Chris D

XenForo developer
Staff member
#5
Unfortunately there doesn't appear to be any progress with this and I'm not overly hopeful there will be. The issue was first raised over two years ago and although there are some workarounds, no one has actually dedicated time to officially patching them.

After some consideration, I think we'll just loosely call this "Can't Fix" for now. The good news is due to a number of changed approaches in XFMG 2.0 we won't actually need Chosen because the process for choosing which category or album to add media to is completely different.