Open kitzberger opened 4 months ago
@kitzberger Thanks for reporting, the issue is known and tracked in EXT:solrfal private repository. As far as I know all versions are affected. The TYPO3 core behaves different on some place by resolving the relative/absolute path in CLI and Web contexts. I'll add the infos about source of trouble as soon I'm confronting with it again.
Most probably the fix in the core is required. But @kitzberger if you can, please debug to the source of TYPO3 core back and add infos here. Thanks
@dkd-kaehm, here's what I found out today while debugging this:
In the core there's an event GeneratePublicUrlForResourceEvent
that is being dispatched when creating the public URLs of FAL records. Both EXT:frontend and EXT:solrfal are listening to that, but ...
PublicUrlPrefixer
is not active due not having gone thru EXT:frontend's RequestHandler
Maybe EXT:solrfal could simply register EXT:frontend's listener when on TYPO3_MODE=CLI?
// Make sure all FAL resources are prefixed with absPrefPrefix
$this->listenerProvider->addListener(
GeneratePublicUrlForResourceEvent::class,
PublicUrlPrefixer::class,
'prefixWithAbsRefPrefix'
);
Describe the bug
When indexing files via "page context" the
url
property of the documents in the solr index lack theabsRefPrefix
(a.k.a. a single leading slash).Expected behavior
URLs for files should have the same
absRefPrefix
that page documents have as well.Used versions (please complete the following information):