Conversation
d760304 to
791b76e
Compare
a16d6aa to
5dc406e
Compare
5dc406e to
1dd65f1
Compare
|
|
||
| return ( | ||
| <PluginDocumentSettingPanel title={ __( 'Hidden Lesson', 'wporg-learn' ) }> | ||
| <PluginDocumentSettingPanel title={ __( 'Hidden Lesson (deprecated)', 'wporg-learn' ) }> |
There was a problem hiding this comment.
Delete this setting panel block once data migration is complete
| $tax_query = $query->get( 'tax_query', array() ); | ||
|
|
||
| $exclude_lesson_query = array( | ||
| $exclude_lessons_by_post_meta = array( |
There was a problem hiding this comment.
Meta query can be removed once data migration is complete
|
@gibrown @kangzj this has shipped now, but doesn't seem to have fixed this issue with hidden lessons appearing in search results. This production lesson 'Quiz time' has the 'hidden' term from the existing Jetpack 'show' taxonomy applied. It is hidden when viewing the archive, but visible in search:
I've used the jptools to check the post (id 257231) and I can see that it has the taxonomy applied. I have tried to do an incremental sync, but discrepancies are still reported: Should I try a full sync? I have tried this in the test site too with a full sync and it's not working there either, but does work with Jetpack Search disabled:
Any idea what's going wrong? Thanks in advance for your help. |
|
I've replied in #2735 |



Attempt to fix #2735
Using post meta to hide lessons in search results doesn't work with Jetpack classic search, so this PR attempts to fix this by using a taxonomy, which are indexed. As suggested by @gibrown here I've used an existing Jetpack taxonomy 'show' so that we don't need to add a new taxonomy.
I've left the existing post meta field for now while we migrate data to the new taxonomy, but a deprecation label has been added.
Testing
This can only be tested in sandbox, and I think it will need to be shipped to be fully tested, due to the Jetpack elastic search sync needing to be run. I've tried syncing before shipping and it doesn't seem to work.