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

[BUG] Cannot generate URLs for restricted detail PIDs #3615

Closed
sascha-schieferdecker opened this issue Apr 24, 2023 · 4 comments · Fixed by #3620
Closed

[BUG] Cannot generate URLs for restricted detail PIDs #3615

sascha-schieferdecker opened this issue Apr 24, 2023 · 4 comments · Fixed by #3620

Comments

@sascha-schieferdecker
Copy link
Contributor

Describe the bug
Cannot index restricted detail pages for e.g. news records anymore. Also happens with other custom indexers.

This worked with ext_solr 11.0.5 and TYPO3 10.4.

Remark: If a parent page is restricted and set to extend this restriction to subpages, the generation of a detail link for results works.

To Reproduce
Steps to reproduce the behavior:

Set access of a page to "show at any login" and put a news detail plugin on this page. The indexer can't get a link to the detail page anymore, the link generated always points to the login page.

Expected behavior
The indexer should generate the link to the detailpage based on this TYPOSCRIPT:

default = TEXT
default {
	typolink.parameter = {$plugin.tx_news.settings.detailPid}
	typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}&L={field:__solr_index_language}
	typolink.additionalParams.insertData = 1
	typolink.useCacheHash = 1
	typolink.returnLast = url
}

Used versions (please complete the following information):

  • TYPO3 Version: 11.5.26
  • EXT:solr Version: 11.5.1/11.5.2
  • Used Apache Solr Version: Latest typo3solr/ext-solr:release-11.5.x
  • PHP Version: 7.4.33
  • MySQL Version: 5.7
@dkd-kaehm dkd-kaehm changed the title [BUG] Cannot index restricted detail pages for e.g. news records anymore [BUG] Cannot generate URLs for restricted detail PIDs Apr 28, 2023
@dkd-kaehm
Copy link
Collaborator

Please try https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Typolink.html#linkaccessrestrictedpages

If it works, please create PR with description in FAQ in docs folder and add it to the TypoScript Examples file.

@sascha-schieferdecker
Copy link
Contributor Author

It works 👍I'll create a PR.

@dmitryd
Copy link
Contributor

dmitryd commented Jul 3, 2023

Should this be set automatically by solr via config.typolinkLinkAccessRestrictedPages when indexing?

@dkd-kaehm
Copy link
Collaborator

Should this be set automatically by solr via config.typolinkLinkAccessRestrictedPages when indexing?

I'll merge the provided pull-request.
IMHO the PR is fine for EXT:solrs responsibility.
The setting in config.typolinkLinkAccessRestrictedPages is global, can impact other plugins on that page.

dkd-kaehm pushed a commit to sascha-schieferdecker/ext-solr that referenced this issue Oct 12, 2023
* adds explanation how to generate URLs to restricted pages
* enables `typolink.linkAccessRestrictedPages` for EXT:news index example

Fixes: TYPO3-Solr#3615
dkd-kaehm pushed a commit to dkd-kaehm/ext-solr that referenced this issue Oct 12, 2023
* adds explanation how to generate URLs to restricted pages
* enables `typolink.linkAccessRestrictedPages` for EXT:news index example

Fixes: TYPO3-Solr#3615
Ports: TYPO3-Solr#3620
dkd-kaehm pushed a commit to sascha-schieferdecker/ext-solr that referenced this issue Oct 12, 2023
* adds explanation how to generate URLs to restricted pages
* enables `typolink.linkAccessRestrictedPages` for EXT:news index example

Fixes: TYPO3-Solr#3615
dkd-kaehm pushed a commit that referenced this issue Oct 12, 2023
* adds explanation how to generate URLs to restricted pages
* enables `typolink.linkAccessRestrictedPages` for EXT:news index example

Fixes: #3615
dkd-kaehm pushed a commit that referenced this issue Oct 12, 2023
* adds explanation how to generate URLs to restricted pages
* enables `typolink.linkAccessRestrictedPages` for EXT:news index example

Fixes: #3615
Ports: #3620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants