Skip to content

fix/4159: Fix sync indexing all public meta when Post Search is disabled#4291

Open
Sidsector9 wants to merge 3 commits intodevelopfrom
fix/4159
Open

fix/4159: Fix sync indexing all public meta when Post Search is disabled#4291
Sidsector9 wants to merge 3 commits intodevelopfrom
fix/4159

Conversation

@Sidsector9
Copy link
Member

@Sidsector9 Sidsector9 commented Feb 23, 2026

Description of the Change

  • When the "Post Search" feature is disabled, $search->weighting is null because Search::setup() never runs. This caused filter_allowed_metas() to fall through to filter_allowed_metas_auto(), indexing all public meta.
  • Fix by instantiating a fallback Weighting object when $search->weighting is unavailable, so get_meta_mode() still returns 'manual'.
  • Apply the same fallback in filter_allowed_metas_manual() to prevent a fatal error when accessing $search_feature->weighting while Search is disabled.

Closes #4159

Changelog Entry

Fixed - sync indexing all public meta when Post Search is disabled

Credits

Props @burhandodhy @Sidsector9

Checklist:

@Sidsector9 Sidsector9 self-assigned this Feb 23, 2026
@Sidsector9 Sidsector9 added this to the 5.4.0 milestone Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Sync process index all the public meta when the "Post Search" is disabled

1 participant