those are the steps found on the home page

1. Argument not available to views? Use: When the filter value is not available » Provide default value » URL path alias from URL
2. Argument available to views? Use: When the filter value is available or a default is provided » Specify validation criteria » Validate URL path alias

I could see the 1. setting but there is no "Validate URL path alias" or similar as seen on the 2. setting
is this a problem of the drupal 8 version anybody has succesfully used it can post a screenshot ?

CommentFileSizeAuthor
#6 2923039-6-argument-validator.patch4.5 KBmlncn

Comments

GiorgosK created an issue. See original summary.

jasloe’s picture

deleted

jasloe’s picture

Wondering same and resurrecting this thread. @heddn is the documentation incorrect? Looking at the plugin itself, I see a form building function for the first use case, but nothing for url path validation.

heddn’s picture

Looks like the D8 port is missing the ViewsArgumentValidator. It has the ViewsArgumentDefault, but not the other set of code. Want to write a quick patch and I'll commit it?

Here's an example to model from: https://cgit.drupalcode.org/drupal/tree/core/modules/views/src/Plugin/vi.... You won't need all the other methods, just this one.

And this is the D7 code: https://cgit.drupalcode.org/views_url_path_arguments/tree/views_plugin_a...

jasloe’s picture

Sure, I'll take a look. Thanks for getting me started!

mlncn’s picture

Component: Documentation » Code
Category: Support request » Feature request
Status: Active » Needs review
StatusFileSize
new4.5 KB

I gave this a try: https://gitlab.com/agaric/drupal/views_url_path_arguments/blob/8.x-1.x/s...

The validator is available where it's supposed to be, a separate fieldset titled "When the filter value IS in the URL or a default is provided"

I think it would work. However, due to circumstances beyond my control, the validator was only ever called when the entity it was to match against did not have a path alias to check.

Our view is configured to show a list of blog posts at blogs/123, where 123 is the user's entity ID (uid).

Oh. It's because we migrated all the old path aliases (so blogs/jim was set to go to blog/3, and would never touch the View on the new site at all.) Damnit Jim.

OK here's a patch and people can also use the fork at https://gitlab.com/agaric/drupal/views_url_path_arguments

But personally i will be pursuing the path alias / pathauto enhancement approach to meeting the same goal, as the structure of our migrated data fits that better. This module is great though!

heddn’s picture

I'll see if I can set some time aside later to commit https://gitlab.com/agaric/drupal/views_url_path_arguments/blob/8.x-1.x/s...

  • heddn committed 38280c2 on 8.x-1.x authored by mlncn
    Issue #2923039 by mlncn, heddn: can't configure the module
    
heddn’s picture

Status: Needs review » Fixed

I've merged https://gitlab.com/agaric/drupal/views_url_path_arguments/blob/8.x-1.x/s... and committed it. It is completely untested, so I'll have to wait for feedback if this is resolved. But marking fixed for now. Someone can open a new issue if it is still a problem.

Status: Fixed » Closed (fixed)

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