statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Daft pages appearing in search #2474

Closed lukeagsmith closed 4 years ago

lukeagsmith commented 4 years ago

Describe the bug With the local search driver, draft pages appear in the search index.

Expected behaviour Only published pages should appear in the index.

Environment details (please complete the following information):

lukeagsmith commented 4 years ago

UPDATE

It appears this is related to having supplement_data="false" on the search tag.

Removing the parameter makes drafts not appear in the results.

I think this is still a bug though, supplement_data is a nice feature and shouldn't come at the expense of showing incorrect information.

FYI even putting the published field in the search index still realists in drafts being shown when supplement_data="false".