Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Enforce visibility context in Tsfe #3050

Merged
merged 1 commit into from
Apr 11, 2023
Merged

[BUGFIX] Enforce visibility context in Tsfe #3050

merged 1 commit into from
Apr 11, 2023

Conversation

saitho
Copy link
Contributor

@saitho saitho commented Oct 8, 2021

What this pr does

TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

How to test

  1. Create two sys_categories "Category 1" and "Category 2". Create a German translation for both of them ("Kategorie 1" and "Kategorie 2") and disable the translation of "Category 2"
  2. Create a Ext:news record and assign both categories to it. Then create a German translation. Make sure both categories are selected there as well.
  3. Add News indexer in TypoScript setup:
@import 'EXT:solr/Configuration/TypoScript/Examples/IndexQueueNews/setup.typoscript'
  1. Index the news record via the TYPO3 backend.
  2. Look at the index entries.
    In core_en the entry has: "category_stringM":["Category 1", "Category 2"],
    In core_de the entry has: "category_stringM":["Kategorie 1", "Category 2"],

Fixes: #3046

Copy link
Collaborator

@dkd-kaehm dkd-kaehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix Mario, please make suggested changes.

Classes/FrontendEnvironment/Tsfe.php Outdated Show resolved Hide resolved
@saitho saitho requested a review from dkd-kaehm October 11, 2021 13:29
Copy link
Collaborator

@dkd-kaehm dkd-kaehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Thanks for changing that.
This will be merged after ports for following branches are available:
release-11.0.x, release-11.1.x, main

dkd-kaehm pushed a commit to dkd-kaehm/ext-solr that referenced this pull request Nov 15, 2021
TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

Resolves: TYPO3-Solr#3046
Relates: TYPO3-Solr#3050, TYPO3-Solr#2976
dkd-kaehm pushed a commit that referenced this pull request Nov 27, 2021
TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

Resolves: #3046
Relates: #3050, #2976
dkd-kaehm pushed a commit that referenced this pull request Nov 29, 2021
TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

Resolves: #3046
Relates: #3050, #2976
dkd-kaehm pushed a commit to dkd-kaehm/ext-solr that referenced this pull request Dec 2, 2021
TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

Resolves: TYPO3-Solr#3046
Relates: TYPO3-Solr#3050, TYPO3-Solr#2976
@dkd-friedrich
Copy link
Member

Fix is already merged in main and release-11.5.x.

I'll update the pr for release-11.2.x, release-11.0.x only receives elts updates and is not relevant here.

@dkd-friedrich dkd-friedrich changed the base branch from release-11.5.x to release-11.2.x April 11, 2023 12:26
TYPO3 by default enables a preview mode if a backend user is logged in,
the VisibilityAspect is configured to show hidden elements.

Due to this setting hidden relations/translations might be indexed
when running the Solr indexer via the TYPO3 backend.

To avoid this, the VisibilityAspect is adapted for indexing.

Resolves: #3046
@dkd-friedrich dkd-friedrich merged commit 85de12d into TYPO3-Solr:release-11.2.x Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Indexing records with SOLR_RELATION via backend considers hidden relation records
3 participants