Exposed Filter using "Content URL Alias" produces zero results

Created on 27 June 2025, about 1 month ago

Problem/Motivation

Module installed in Drupal 10 test environment. I have a block view that shows all content, with Title and link to content. I have an exposed filter for Title, but I want an exposed filter to refine results by the aliases being used by a node. I created the relationship to "Content URL Alias". I created another exposed filter using "Content URL Alias", which is set to use "contains". When I enter anything into the new filter, it draws zero results. I tried this logic:

Content: Published (= Yes)
AND
Content: Title (exposed)
OR
(Content URL Alias) Alias: URL alias (exposed)

Steps to reproduce

Install Drupal 10.3.x and install/enable the module. Create a view with all content nodes. Create the relationship and an exposed filter using the newly available "Content URL Alias". Test using the exposed filter.

Am I missing something like a dependency or requirement?

πŸ’¬ Support request
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rraney

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

Comments & Activities

  • Issue created by @rraney
  • πŸ‡ΊπŸ‡ΈUnited States alison

    I'm experiencing almost the same thing. Same setup for me -- in my case, I added a new display to the core "Content" admin view, I added the Content URL alias relationship, then the content URL alias filter (exposed). On that filter, I've tried most of the available operators.

    When I put "about" in the filter, I get the page with the URL alias about-us and another page with the URL alias about-us/contact-us -- but not about-name-of-institute.
    When I put "research" in the filter, I get the page with URL alias research but not research/cancer-research and not research/faulty/jane-doe. (So, that's not even consistent with the behavior when I search for "about" πŸ€¦β€β™€οΈ )

    By the way, when I add the "URL alias" field to the view, this field is empty in the view results for almost every row... Ok so as I type that, it occurs to me that probably the views_url_alias table probably isn't fully populated. Hmm...

    I'm sure I'm doing something wrong, but I can't figure out what.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    @rraney Could you say if any of the following is true for you, too? -- if not, I'll exit this issue and pursue the problem elsewhere!

    When I enabled the module via drush, I did get this error (below) -- I looked for it in the issue queue but didn't find anyone else talking about it, so I figured I might as well try out the module anyway -- but, maybe it's why things aren't working, maybe the views_url_alias table didn't get populated because whatever this error is about?

    $ drush en views_url_alias
    
    In Router.php line 150:
    
      No routes found for "/".
    
    

    After seeing the error, I also checked dblog and there were no associated messages in there -- but now I'm realizing there's actually no views_url_alias module installed message either! Shoot. But the functionality is sorta there in Views, and there are handful (like 8) records in the views_url_alias table...

    I just tried uninstalling, then installing via Extend in the Drupal UI (instead of Drush). I got WSOD, and dblog says PHP error:

    Symfony\Component\Routing\Exception\ResourceNotFoundException: No routes found for "/admin/modules". in Drupal\Core\Routing\Router->matchRequest() (line 150 of /app/web/core/lib/Drupal/Core/Routing/Router.php).
    

    So, could be related to πŸ› No routes found for "/admin/modules" Closed: outdated , but I'm going to stop saying things for now, because I think I'm getting outside the scope of this issue (unless @rraney says they also experienced what I'm describing).

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I have a bad habit of creating issues, then later on I don't remember the context of the issue. I'm looking for the view or what I might have been doing at the time. I'll report back one way or another with an answer.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    Regarding installation, I had no issues. The module is installed. I checked recent logs for anything related to the module. I see this warning:

    Schema information for module views_url_alias was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, views_url_alias_update_8000().

    This may have been before I updated the database.

    I'm seeing a Views UI error. Not sure if it's related.

    Error: Call to a member function getPluginDefinition() on null in Drupal\views_ui\ViewListBuilder->getDisplaysList() (line 259 of /app/web/core/modules/views_ui/src/ViewListBuilder.php).

    As for the View, I'm following along with your example. I created a view with all content that is Published. I added a relationship to "Content URL Alias". I added an exposed filter using "Contains" for the Alias: URL Alias field. When I put anything in the search input, nothing appears.

    @alison Did you look at the views_url_alias table manually? (I don't know how else you would). I'm going to see if I can find a .readme or any documentation on how to use this module.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I was in the wrong codebase, sorry.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    Ah! -- ok.

    I didn't look in the views_url_alias table, I just added the "URL alias" field to my view, to see what values it was aware of. (And, only 8 nodes had values in that column, out of ...idk, a few thousand.)

Production build 0.71.5 2024