TYPO3-Solr / ext-solr

A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
GNU General Public License v3.0
136 stars 246 forks source link

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

Closed schugabe closed 2 months ago

schugabe commented 2 years ago

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):

dkd-kaehm commented 2 years ago

@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.

schugabe commented 2 years ago

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.

dkd-kaehm commented 2 months ago

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