Problem/Motivation

As explored in #3268487: EntityResource::getRequestLink() prevents outbound path processing on pagination links, in some circumstances core (e.g., json:api) generates absolute "external" URLs (from the original request) that should, but don't, undergo path processing. We should extend the existing logic in UnroutedUrlAssembler::buildExternalUrl() to carve out a path for path processing, similar to the existing code in ::buildLocalUrl().

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3268508

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bradjones1 created an issue. See original summary.

bradjones1’s picture

Status: Active » Needs review
bradjones1’s picture

Status: Needs review » Needs work

Code style and also I forgot to add the base path back on to the path after processing.

ranjith_kumar_k_u’s picture

StatusFileSize
new3.48 KB
new1.02 KB

Fixed CS errors.

bradjones1’s picture

Test failures *look* to be related to test setup/dependencies missing, not any regressions (that we can see yet, anyway.)

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bradjones1’s picture

Back for a rebase and adding some test coverage. I think this would fix the issue outlined in #3268487: EntityResource::getRequestLink() prevents outbound path processing on pagination links. Would be amazing to try to get this into 11.0 but I know we're right up against the beta.

Added a draft change record as well.

It's getting late now but it seems most of the errors have to do with test setup, as noted before. I'll loop around on this Monday.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.