I've installed the module on Drupal 8.3.0. It works pretty good but found an issue.

When I launch something on the backoffice (generate path alias for instance) that needs a batch, Drupal throws me a "page not found".

I noticed that it is the processInbound function which causes this error. In fact, the path given in argument is modified in every case which we might not want.

Patch is coming

Comments

garnett2125 created an issue. See original summary.

garnett2125’s picture

StatusFileSize
new958 bytes
kala4ek’s picture

StatusFileSize
new1.33 KB

The patch does not work for me.

$source = $this->aliasManager->getPathByAlias($candidate_alias)
$source will always contains smth. It may be source path, if it exist or it may be alias. See description of getPathByAlias method.

I rewrite the path and it works for me.

imyaro’s picture

Assigned: garnett2125 » Unassigned
StatusFileSize
new1.41 KB

Hello,
Guys, thanks for your patches, but it isn't work if we have, for example, one node that has path "foo" and another "foo/bar"
In this way node with alias "foo" will be found and URL for second one will be /node/1/bar (instead of the /node/2)
I have changed a search "direction" it works better now.

martins.bertins’s picture

StatusFileSize
new1.29 KB
new2.06 KB

Found a scenario where the processInbound() function returned incorrect path for standard taxonomy term path taxonomy/term/{taxonomy_term} (this might apply for any entity). Added a fix for this.
Also the processOutbound() function must take into account language code when looking for path alias.

martins.bertins’s picture

StatusFileSize
new1011 bytes
new2.27 KB

Added validation for path.

adriancid’s picture

Status: Needs review » Fixed

Thanks @fellows for the patch

adriancid’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

okin’s picture

The validation of the path should validate the path regardless the current user has access to it or not. Otherwise a not found is triggered and not an access denied.

\Drupal::service('path.validator')->getUrlIfValidWithoutAccessCheck($return_path)

adriancid’s picture

@okin can you provide a patch for this?

okin’s picture

StatusFileSize
new604 bytes

Here it is

adriancid’s picture

Thank @okin the patch was applied it should be shown here in the next minutes I think.