When I enter as an argument if field something like '16,23/4+45+1' view display does not work as designed. It considers this as 1 argument.
I've submitted a patch that could fix this issue and allows to have as many arguments as needed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2846625-Multiple-argument-viewsreference-fix.patch | 1.71 KB | eugenechechel |
| form-edit.png | 34.97 KB | eugenechechel |
Comments
Comment #2
eugenechechel commentedHere is my patch that accepts multiple arguments
Comment #3
joekersThanks for reporting this bug and for the patch. I tested your patch and found the following:
- It works with one contextual filter with multiple values e.g
4,2(ID contextual filter)- It doesn't work with two contextual filters e.g
4,2/1(ID contextual filter and the published contextual filter)- It doesn't seem to work if the arguments field is left blank - the view doesn't render at all but this may be unrelated as I've been working on various bits of the module.
I'd recommend looking at how the views module does it in
breakString()- I think we'll need to do the same if not something very similar.Comment #4
eugenechechel commentedThanks for the feedback. I'll take a look on my end!
Comment #5
NewZeal commentedJoekers,
The arguments field is blank issue might be the same as https://www.drupal.org/node/2847192
Can people download the latest dev code, check this change is in the code, test and report back so we can go beta with or without it: https://www.drupal.org/node/2846411
Thanks
Kent
Comment #6
joekersYes No. 3 from my comment is because of issue #2847192: Empty viewsreference argument breaks contextual filter default value handling which is now fixed in the latest dev release.
So the only issue with this patch now should be that it doesn't work with multiple contextual filters.
Comment #7
joekersHey @EugeneChechel have you had any luck fixing the code to work with multiple contextual filters?
Comment #8
eugenechechel commentedNo, not yet @joekers. I'll figure it out this week.
Comment #9
joekersI've just done some more testing on this and it actually seems to be working now. I'm not sure if other commits have effected the functionality but I'm glad to say it's working for me at least!
Marking as needs review so someone else can test before closing this issue.
Comment #10
joekersHaven't seen any more problems with this so I presume it's fine, marking as fixed, thanks again EugeneChechel.
Comment #11
joekers