Restore ability for prettiest paths (page/category/example) to work with embedded views

Created on 28 October 2025, 9 days ago

Problem/Motivation

We had Facets Pretty Paths and Facets 3.x working great together with the no-query-string (base style, and even had Entity Reference Filtering Link producing links that Facets Pretty Paths handled perfectly, in the style of /projects/services/film-media, via a patch/issue fork: Make compatible with Facets Pretty Paths Active

… and then we switched the view from a page display to an embed display, so that content authors could edit the title and frontmatter of the view the same as any content. Notably, this is the same decision that Drupal CMS (fka Starshot) made.

And of course it all stopped working— FPP has no concept of random, technically non-Views, paths.

Steps to reproduce

  1. Create a view with only an embed display and configure facets pretty paths for taxonomy terms, set to use the facets pretty paths coder .

Observe:

  • Facet filters do not redirect to pretty paths.
  • Going directly to a pretty path does not work.

Proposed resolution

The full solution is probably outside the scope of this module, but Facets Pretty Paths still needs some changes to make it possible, i think.

  • Add a hook or plugin to be able to add routes to src/RouteSubscriber.php
  • Probably extend or provide an alternative src/Routing/ViewPageController.php
  • User-interface-wise, the ideal would be to add a "Where will this be embedded?" path option to embed views, with the note "This is needed to work with Facets Pretty Paths"

Or documentation on providing an alternative, and both the route subscriber and the in a separate/sub module.

Remaining tasks

Confirm/correct and expand on proposed approach.

User interface changes

In Facets Pretty Paths or a submodule or another contributed module,

API changes

In Facets Pretty Paths some way to set the base routes that Facets Pretty Paths needs to watch.

Data model changes

None, or a place to store the above base routes.

Pre-generating possibly a million routes is not the way this is done, as i understand it; the base routes are rather extended to have the possibility of up to about forty facets.

So we could produce a route like this: '/node/{node}/{facets_query}/{f0}/{f1}/{f2}/{f3}/{f4}/{f5}/{f6}/{f7}/{f8}/{f9}/{f10}/{f11}/{f12}/{f13}/{f14}/{f15}/{f16}/{f17}/{f18}/{f19}/{f20}/{f21}/{f22}/{f23}/{f24}/{f25}/{f26}/{f27}/{f28}/{f29}/{f30}/{f31}/{f32}/{f33}/{f34}/{f35}/{f36}/{f37}/{f38}'

But probably better in this case not to care about whether it is a node or what that it is being attached to, and use only the path?

'/example-path/{facets_query}/{f0}/{f1}/{f2}/{f3}/{f4}/{f5}/{f6}/{f7}/{f8}/{f9}/{f10}/{f11}/{f12}/{f13}/{f14}/{f15}/{f16}/{f17}/{f18}/{f19}/{f20}/{f21}/{f22}/{f23}/{f24}/{f25}/{f26}/{f27}/{f28}/{f29}/{f30}/{f31}/{f32}/{f33}/{f34}/{f35}/{f36}/{f37}/{f38}'

That means we do not have to worry about separating /node/123/edit or /node/123/revisions/1234/view from the facets. If somebody is using subpath aliases though, do we have to worry about conflicts?

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Pipeline finished with Success
    3 days ago
    Total: 243s
    #647933
  • Pipeline finished with Success
    3 days ago
    Total: 253s
    #648243
  • Pipeline finished with Success
    3 days ago
    Total: 374s
    #648320
  • Pipeline finished with Success
    3 days ago
    Total: 414s
    #648350
  • Pipeline finished with Success
    2 days ago
    Total: 593s
    #648795
  • Pipeline finished with Success
    2 days ago
    Total: 336s
    #648818
  • Pipeline finished with Running
    2 days ago
    #649165
  • Pipeline finished with Success
    2 days ago
    #649210
  • Pipeline finished with Success
    2 days ago
    Total: 391s
    #649266
  • Pipeline finished with Success
    2 days ago
    Total: 563s
    #649408
  • Pipeline finished with Success
    2 days ago
    Total: 278s
    #649474
  • Pipeline finished with Canceled
    about 6 hours ago
    Total: 121s
    #651419
  • Pipeline finished with Success
    about 6 hours ago
    Total: 354s
    #651420
Production build 0.71.5 2024