Reverting the code from patch #6 seems to resolve the issue for Drupal 10.3.6.
It looks like we may need to create a separate version specifically for Drupal 10 to ensure compatibility.
Looks like it's not working again on Drupal 10.3.6 with new content, as shown in the screencast here.
Only works well when I edit content.
Thanks @mkalkbrenner! I've created a patch based on the feedbacks.
Also, I've changed the stopwords to this list instead: https://gist.githubusercontent.com/spikeekips/40eea22ef4a89f629abd87eed5...
For the hook_update, hopefully I did it right. Kindly advise if there's other better way to do this ;)
Tried the patch, but unfortunately this does not work well in Multi-lingual setup.
It seems that the commit done in https://git.drupalcode.org/project/conditional_fields/-/commit/e1507398b... technically broke this functionality.
Remove that line of code and it works as it should for required fields that are not visible.
I can confirm this patch triggered all errors regardless if the field is visible/hidden, as mentioned in #14.
Another issue is open to discuss this further: https://www.drupal.org/project/conditional_fields/issues/3344587 📌 Support field turning hidden by condition to loose its required status Needs work
Just tested this and confirmed that 4.0.0-alpha2 has this issue. Downgraded to 4.0.0-alpha1 and it was fine.
Ok my apologies, I believe my comment above can be ignored.
Apparently you will need to create a Replica manually in Algolia dashboard. The replica's name follows the index in the URL generated in Drupal - In my case above, the name is directory_test_created_1_asc. Then in that Replica's index, go to Configuration > Ranking and Sorting > Create the field that you want to sort.
I supposed the sorting is not really in synced with Drupal Views for now.
Not sure if this is related, but it seems that if I add Sort Criteria, there will be no results returned as well.
Checking the logs in Algolia, it seems Drupal is appending the field names into the API URL somehow, causing it 404 error.