Skip to content

public_url prefixed with http://bin/ #205

@kitzberger

Description

@kitzberger

Hey guys,

we're using this extension in combination with solrfal and we're getting wrong filePublicUrl and url when indexing access protected file storages.

screenshot-intranet hs-osnabrueck de vm_18983-2023 02 24-11_36_38

This is a similar issue as #40, I guess. But we're on different versions and there's no EXT:realurl in the mix anymore.

  • TYPO3 10.4
  • fal_securedownload 3.0.2
  • solr 11.2.1
  • solrfal 10.0.0
  • solrconsole 10.0.0

We've set up the file index queue as described in the manual: Misc/Index.rst#extsolrfal-support

I adjusted the patch here (#40 (comment)) to the post-domain-records world and found out that the only thing we need before creating the public URL is flushing the internal runtime cache:

         $this->publicUrlAspect->setEnabled(false);
+        GeneralUtility::flushInternalRuntimeCaches();
         $metadata['public_url'] = $item->getFile()->getPublicUrl();
         $this->publicUrlAspect->setEnabled(true);

Not exactly sure whether it's a EXT:fal_securedownloads or a EXT:solrfal issue but I thought I'd start the conversation here ;-)

As a workaround I've tweaked the indexing config by simply replacing the bad part of the URL:

plugin.tx_solr.index.queue._FILES.default {
            url = TEXT
            url.field = public_url
            url.replacement.10.search = http://bin/
            url.replacement.10.replace = /
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions