Custom Fields
Re-Envisioned
Support Meta Box – FacetWP Integrator Re-indexing loses data of custom fields in the FacetWP index

  • Creator
    Topic
  • #28368
    AMX
    Participant

    Hi,

    I am new to Meta Box and FacetWP, coming from Toolset.

    I'm building my first project with the Meta Box / FacetWP combination (the latest versions) and have an issue with filtering by custom fields.

    With custom Taxonomies everything works flawlessly as expected.

    But when a facet contains a Meta Box custom field and I press "Re-index" in FacetWP, the data from all custom fields is lost in the FacetWP index, so all field filters on the front end are empty, as if the posts didn't have custom field values. Taxonomy filters stay intact.

    The values of custom fields remain in the post itself, but they are gone completely from the FacetWP index table in the database after triggering re-indexation.

    When I open one post and simply re-save it, the values of all fields from the particular post "magically" re-appear in the FacetWP index. So, after each re-indexing I would need to open every single post and re-save it, but that is not doable, of course.

    I tested it with several field types: checkboxes, text and numbers. The behavior was always the same.

    The options "Searchable", "Sortable" and "Filterable" are checked for the fields. Deactivating practically all other plugins didn't help.

    It's probably something simple, but after reading the documentation I cannot figure out why re-indexing always loses the data of custom fields.

    I will appreciate your help.

    Greetings,

    Tom

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #28381
    Long Nguyen
    Moderator

    Hi,

    Thank you for reaching out.

    I'm using FacetWP v3.8.0.1 but do not see any issue after clicking "Re-index", all field values show on the filter as well. Please use the field ID under section Custom Fields instead of section Meta Box in the Data Source input. Screenshot https://share.getcloudapp.com/ApuzKvwY

    #28398
    AMX
    Participant

    Thank you for your answer.
    Indeed, when I scroll down to the Custom Fields section and use that, the data stays after re-indexing.

    However, if I use a Custom Table, the custom fields are not visible in that section, so I cannot select them. I can then only see them in Data Source -> Meta Box -> [CPT Name] Custom Field Label.

    According to this thread:
    https://metabox.io/support/topic/facetwp-custom-table/

    the Integrator supports Custom Tables, so I am a little confused. Of course, I would prefer to use custom tables, when possible. Is it (still) possible to have custom tables with FacetWP?

    What is the function of the Meta Box section in Data Source? When would I use that?
    Filtering kind of works, but only until I click "re-index"...

    Greetings,
    Tom

    #28411
    Long Nguyen
    Moderator

    Hi Tom,

    Thank you for your feedback.

    I also experience that issue with the field value saved in the custom table. It is possible that something goes wrong in the new version of both plugins. I will inform the development team to check this issue and get back to you later.

    #28424
    AMX
    Participant

    Thank you, Long.

    #28447

    Hi, wait a solution for that! thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.