- π©πͺGermany vistree
On Drupal > 10.2 the patch from #13 brings an error when running drush updb:
Drupal\content_translation\Plugin\views\filter\UnTranslated::operators() must be public
Attached find a minimal change for the patch from #13
I would like to implement a filter to show only not translated contents.
I implemented a new class extending FilterPluginBase.
I could make it work to have a checkbox on the screen, and found that I have two possibilities for implementing the filtering:
- use query() function - I did not use it as I think I can not check in the same query all things: if content type is set to be translatable, how many languages are set for the cms to be used..and check also if the node has all languages created.
- use postExecute(&$values) - here I can use getTranslationLanguages function of the entity, but I have to unset some rows, so I had problems with paging. I found that I can call postExecute of pager.
Currently my main problem is that it seems postExecute does not run in all cases.. only after clear cache.
If anybody has any idea how to implement filter for untranslated contents, how I can start with this issue, I would be happy to read about it.
If anybody has any idea if I can use postExecute, or I'm absolutely on wrong way, please tell me. Thanks!
Needs work
11.0 π₯
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
On Drupal > 10.2 the patch from #13 brings an error when running drush updb:
Drupal\content_translation\Plugin\views\filter\UnTranslated::operators() must be public
Attached find a minimal change for the patch from #13