-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Fix indexing of access protected pages
Fixes indexing of access protected pages and/or page contents. Resolves: #3735
- Loading branch information
1 parent
f35f652
commit a6168bc
Showing
13 changed files
with
326 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
$requestMiddlewares = [ | ||
'apache-solr-for-typo3/page-indexer-initialization' => [ | ||
'target' => \ApacheSolrForTypo3\Solr\Middleware\PageIndexerInitialization::class, | ||
'before' => ['typo3/cms-frontend/tsfe'], | ||
'before' => ['typo3/cms-frontend/tsfe', 'typo3/cms-frontend/authentication'], | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dkd-kaehm
Collaborator
|
||
'after' => ['typo3/cms-core/normalized-params-attribute'], | ||
], | ||
]; | ||
|
12 changes: 12 additions & 0 deletions
12
Tests/Integration/IndexQueue/Fixtures/can_index_access_protected_page.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"fe_groups", | ||
,"uid","pid","title" | ||
,1,1,"group 1" | ||
"pages", | ||
,"uid","pid","is_siteroot","doktype","slug","title","subtitle","crdate","tstamp","fe_group" | ||
,2,1,0,1,"/protected_page","protected page","",1449151778,1449151778,1 | ||
"tt_content", | ||
,"uid","pid","CType","header","fe_group" | ||
,11,"2","header","public content of protected page",0 | ||
"tx_solr_indexqueue_item", | ||
,"uid","root","item_type","item_uid","indexing_configuration","changed","indexed","has_indexing_properties","indexing_priority","indexed","errors" | ||
,4711,1,"pages",2,"pages",1449151778,0,0,0,0,0 |
17 changes: 17 additions & 0 deletions
17
...tegration/IndexQueue/Fixtures/can_index_access_protected_page_with_protected_contents.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"fe_groups", | ||
,"uid","pid","title" | ||
,1,1,"group 1" | ||
,2,1,"group 2" | ||
"pages", | ||
,"uid","pid","sys_language_uid","l10n_parent","is_siteroot","doktype","slug","title","subtitle","crdate","tstamp","fe_group", | ||
,2,1,0,0,0,1,"/protected_page","protected page","",1449151778,1449151778,1 | ||
,3,1,1,2,0,1,"/protected_page_de","protected page de","",1449151778,1449151778,1 | ||
"tt_content", | ||
,"uid","pid","sys_language_uid","l18n_parent","CType","header","fe_group","sorting" | ||
,11,"2",0,0,"header","public content of protected page",0,10 | ||
,12,"2",1,11,"header","public content of protected page de",0,10 | ||
,13,"2",0,0,"header","protected content of protected page",2,20 | ||
,14,"2",1,13,"header","protected content of protected page de",2,20 | ||
"tx_solr_indexqueue_item", | ||
,"uid","root","item_type","item_uid","indexing_configuration","changed","indexed","has_indexing_properties","indexing_priority","indexed","errors" | ||
,4711,1,"pages",2,"pages",1449151778,0,0,0,0,0 |
13 changes: 13 additions & 0 deletions
13
...Integration/IndexQueue/Fixtures/can_index_page_with_protected_and_hideatlogin_content.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"fe_groups", | ||
,"uid","pid","title" | ||
,1,1,"group 1" | ||
"pages", | ||
,"uid","pid","is_siteroot","doktype","slug","title","subtitle","crdate","tstamp","fe_group" | ||
,2,1,0,1,"/protected_page","protected page","",1449151778,1449151778,0 | ||
"tt_content", | ||
,"uid","pid","CType","header","fe_group","sorting" | ||
,10,"2","header","protected ce",1,10 | ||
,11,"2","header","hide at login content",-1,20 | ||
"tx_solr_indexqueue_item", | ||
,"uid","root","item_type","item_uid","indexing_configuration","changed","indexed","has_indexing_properties","indexing_priority","indexed","errors" | ||
,4711,1,"pages",2,"pages",1449151778,0,0,0,0,0 |
13 changes: 13 additions & 0 deletions
13
Tests/Integration/IndexQueue/Fixtures/can_index_page_with_protected_content.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"fe_groups", | ||
,"uid","pid","title" | ||
,1,1,"group 1" | ||
"pages", | ||
,"uid","pid","is_siteroot","doktype","slug","title","subtitle","crdate","tstamp","fe_group" | ||
,2,1,0,1,"/protected_page","protected page","",1449151778,1449151778,0 | ||
"tt_content", | ||
,"uid","pid","CType","header","fe_group","sorting" | ||
,10,"2","header","protected ce",1,10 | ||
,11,"2","header","public ce",0,20 | ||
"tx_solr_indexqueue_item", | ||
,"uid","root","item_type","item_uid","indexing_configuration","changed","indexed","has_indexing_properties","indexing_priority","indexed","errors" | ||
,4711,1,"pages",2,"pages",1449151778,0,0,0,0,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Is there a reason to move this middleware?
This change results into failing to execute the Page Indexer Request.
If you have a form on the page, you will get an error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1460975777: A front-end form protection may only be instantiated if there is an active front-end session. | TYPO3\CMS\Core\Error\Exception thrown in file /var/www/html/vendor/typo3/cms-core/Classes/FormProtection/FrontendFormProtection.php in line 92