Forums Forums Search & Filter Pro Combo box resets after selection

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #39121

    This is what is happening:

    https://dl.dropboxusercontent.com/u/2486999/Ugh.gif

    The other fields work just fine, but when I select on a combo box it doesn’t take the selection. It resets to nothing selected.

    I was having the same problem with a slider for that field. I’ve disabled all plugins and I’m using the stock wordpress theme.

    Any suggestions?

    Ross Moderator
    #39362

    Very odd, do you have a link online I could look at?

    Thanks

    Anonymous
    #39417

    I’m developing locally, so it isn’t live yet.

    I’m pretty sure I’ve found the cause – any post meta with a space in the key causes the odd behavior. But WordPress doesn’t care about spaces in meta keys, and doesn’t prevent their creation.

    Advice on fixing?

    Ross Moderator
    #39424

    I guess avoid for now, I’ll have to take a look into this and patch if necessary.

    Thanks

    Anonymous
    #40563

    Any word on this issue? The site I bought the plugin for has spaces in the meta keys, so if it isn’t going to be resolved, I would like to request a refund.

    Thanks again for your help.

    Ross Moderator
    #40760
    This reply has been marked as private.
    Anonymous
    #41057

    The url isn’t an issue since spaces are completely supported in meta values and passed through the url. They encode to %20.

    The site was built adding meta information directly through wordpress on the edit post page, not through a plugin. And wordpress documentation is pretty clear that any string can be a meta key.

    I dug through the code and the issue is in the init_filters function in class-search-filter-cache.php where there is an incorrect comparison. There are a bunch of if(isset($_GET[$filter_name])) statements. When I dump $filter_name for the key “place of origin” it is “_sfm_place_of_origin” but $_GET is set as “_sfm_place of origin” so of course it isn’t found. And it would be found if there weren’t spaces in the key name.

    I wrote in a workaround so I don’t need a refund.

    Ross Moderator
    #41058

    Nice catch! Was it a simple fix? Perhaps something we can look at including in the next update – otherwise you’ll be looking at having to patch every release should you wish to update the plugin.

    Thanks

    Anonymous
    #41059

    I just looked at the fix (I did it over the weekend), and I had the variables backward in my previous response. $_GET has replaced spaces with underscores, $filter_name doesn’t. But to work around it, I just created a bonus variable replacing all the spaces in $filter_name with underscores and did all $_GET lookups with that instead. As far as I can tell, that fixed it.

    I’m still testing to make sure.

    Ross Moderator
    #41161

    Thanks for the info, I’ll have to take a look this area again and review!

    Best

Viewing 10 posts - 1 through 10 (of 11 total)