ext-solr icon indicating copy to clipboard operation
ext-solr copied to clipboard

[BUG] Default translation stays in solr index if hide default translation is activated

Open schugabe opened this issue 2 years ago • 2 comments

Describe the bug Default translation of page stays in solr index if "hide default translation" of l18n_cfg is activated.

To Reproduce Steps to reproduce the behavior:

  1. Add a page in the default translation + add a translation
  2. Run solr indexer
  3. Search for page in default translation and click the link => page is visible
  4. Enable "hide default translation" of page (ignore bug #3246 )
  5. Run solr indexer
  6. Search for page in default translation => still visible + results in 404 when clicked on link
  7. Disable page + enable page
  8. Search for page in default translation => page not visible any more

Expected behavior Setting the "hide default translation" flag should remove the default translation from the solr index.

Used versions (please complete the following information):

  • TYPO3 Version: [e.g. 11.5.16]
  • EXT:solr Version: [e.g. 11.5.0]

schugabe avatar Sep 14 '22 14:09 schugabe

@schugabe Thanks for reporting that issue.

Why ignoring #3246, isn't it the source of trouble? Please test if #3246 interrupts the process before deleting the document from Solr machine.

dkd-kaehm avatar Sep 14 '22 15:09 dkd-kaehm

I think that can be ruled out: step 7 (disable+enable page) also triggers #3246 but the page is updated in the index. And from a fast look in the code I can't find any spot that deletes a page that has that flag added since it's only checked in the PageIndexer and that removes the connection for that language. But that does not help if it's already in the index.

schugabe avatar Sep 14 '22 15:09 schugabe

The translation is removed from index after hiding it. Just tested it now.

dkd-kaehm avatar Jul 09 '24 11:07 dkd-kaehm