Forums Forums Search & Filter Pro Settings & Defaults Strangeness

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #132940

    We’ve encountered some strange behavior when configuring the plugin via the Settings & Defaults menu page in WP Admin. We can select any term in a taxonomy (Categories, tags, or Custom). However, after submitting the form, only terms that have posts are displayed in the fields when the page reloads. The values are correctly stored in the DB.

    Trevor
    #133117

    Are you able to send me a live link/URL to your search page so I can take a look?

    Can you give me an example search to make to see this behavior, and maybe what you had expected to see instead?

    Anonymous
    #133196

    To replicate the issue:
    1. Create several tags, categories, or custom taxonomy terms. The terms are not associated with any posts.
    2. On Settings & Defaults menu page of Search plugin choose those terms to include or exclude.
    3. Save the form
    –what happens: the field for the taxomony is empty.
    –what I expect to happen: the field should contain the terms selected prior to saving the form.
    Extra Credit: Look in the database and you’ll see the value has been correctly saved.

    Trevor
    #133198

    Ah, I understand. Our plugin will only show terms after they have been associated with posts. When you set to include, only posts that have these will be shown. As no posts use them, no posts will be shown.

    Anonymous
    #133220

    Yes, but its confusing to the user. From the user perspective it appears that the plugin is not saving their selections. You could trigger a validation error prior to saving to alert the user that they have selected terms without posts and have them correct the form. I think you might be able to filter the list of terms in the select2 field to exclude terms with no posts. You’d likely also want to add an instruction to the input clarifying that only terms with posts associated can be selected so the user understands why only a subset of the the terms appears when using the select2 field.

    Trevor
    #133378

    Your suggestion for improvements to the UI are noted.

Viewing 6 posts - 1 through 6 (of 6 total)