form icon indicating copy to clipboard operation
form copied to clipboard

!!! TASK: Use configured baseUri in form action

Open simstern opened this issue 6 years ago • 9 comments

$actionRequest->getHttpRequest()->getUri() returns the original request Uri, which conflicts if the Setting Neos.Flow.http.baseUri is overwritten.

TBH: I'm not sure if this is really the best way to replace the base uri, so I'm happy for any feedback.

Closes #22

simstern avatar Sep 04 '19 09:09 simstern

We're pretty much in the process of elaborating the purposes and best approach towards baseUri. We will most likely remove the ATTRIBUTE_BASE_URI solution (which replaced previous getBaseUri() method) on the HTTP request. See also https://github.com/neos/flow-development-collection/pull/1755

/cc @bwaidelich @kitsunet

albe avatar Sep 04 '19 11:09 albe

We will most likely remove the ATTRIBUTE_BASE_URI solution

Right, Christian is on it with https://github.com/neos/flow-development-collection/pull/1755

Most likely the result will look like this:

$uri = $this->baseUriProvider-> getConfiguredBaseUriOrFallbackToCurrentBaseUri();

bwaidelich avatar Sep 04 '19 12:09 bwaidelich

Thanks for the feedback! Christian explained me the changes regarding the baseUri this morning in the Slack channel already. I'm happy to adapt it once they are released :)

I just had to get it work for the current version anyway and therefore this PR is still done the old way for the moment.

simstern avatar Sep 04 '19 12:09 simstern

Ok, so as of https://github.com/neos/flow-development-collection/pull/1755/files the final solution is indeed $uri = $this->baseUriProvider-> getConfiguredBaseUriOrFallbackToCurrentBaseUri(); with an injected instance of Neos\Flow\Http\BaseUriProvider as Bastian mentioned already

albe avatar Dec 01 '19 13:12 albe

@simstern unfortunately this breaks unit tests still and I don't have edit access to your PR

It is a good measure to allow this when creating PRs for upstream Repos:

image

bwaidelich avatar Sep 13 '22 12:09 bwaidelich

FYI: We are thinking of getting rid of the notion of a global baseUri configuration (see https://github.com/neos/flow-development-collection/issues/2157) and started to work on this again. So maybe it makes sense to wait for the direction this is taking before merging this one

bwaidelich avatar Sep 14 '22 14:09 bwaidelich

Thanks for your info and help on this. Makes sense to wait then.

I tried to give you edit access, but it seems I cannot change this anymore (even though, it's documented here how to do it https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)

simstern avatar Sep 15 '22 15:09 simstern