Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
That it. I think is because the hook is implemented with $cache['node'], and that just alter the form for nodes views kind only.
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#22 | views_or.views_.inc-396340-22.patch | 1.92 KB | Darren Oh |
#10 | views_or-6.x-aggregator.patch | 1.35 KB | AlexisWilke |
#7 | views_or.patch | 1.36 KB | meba |
Comments
Comment #1
Alice Heaton CreditAttribution: Alice Heaton commentedAh, it probably does - I've never implemented non-node view filters, so I'll have to look into this.
Comment #2
laVera CreditAttribution: laVera commentedmay i help you? how?
Comment #3
Darren OhIn the meantime, you can add a node relationship to get access to the filter.
Comment #4
laVera CreditAttribution: laVera commentedDarren: Views don't let me do any relationship except user log.
I never did a drupal module, but i know some php, i did read all the code of this modules....and i'm so lost.
Now i think that views_or_views_data_alter() is not getting called, but i don't know where is supposed to be called when run ok.
Any ideas?
Comment #5
Darren OhWe may have to duplicate the filters for every base table. As the module description says, this is an interim solution until Views core is modified.
P.S. You can do this yourself in the file views_or.views.inc. Look for the function views_or_views_data_alter():
Add copies of each $cache item with 'node' replaced with 'user':
Comment #6
laVera CreditAttribution: laVera commentedthanks, i did try it before ask here, and try now again (i can't remember if the first time i write user or users). But don't work.
I apretiate the help of all you.
As i have to had this working today, i just gona make a php page with the querry.
Once again, thanks to all of you.
Comment #7
meba CreditAttribution: meba commentedActually, it's "users", not "user". Attaching a patch.
Comment #8
Alice Heaton CreditAttribution: Alice Heaton commented@meba : Patch looks good.
@nahuel : Could you test the patch to make sure it works as expected ? I'll commit the patch once you confirm it works ;)
Comment #9
laVera CreditAttribution: laVera commentedI'm not running that proyect anymore, and don't know how to patch (yet)
Comment #10
AlexisWilke CreditAttribution: AlexisWilke commentedHi Anselm,
I tested and it works for me. And as I was at it, I added aggregator_item since that's what I really needed 8-)
Thank you!
Alexis Wilke
Comment #11
Darren OhWe're eventually going to need to duplicate this for every base table. It would be more efficient to do so automatically.
Comment #12
AlexisWilke CreditAttribution: AlexisWilke commentedI guess it would be smart to have a sub-function that generates the array since only a few entries have to be added.
Now I'm not too sure what the best method would be since if I add a package such as padfile then I get no support for it either... unless I were to add one more entry to the array for padfiles as it is done in the view_or module.
Thank you.
Alexis Wilke
Comment #13
meba CreditAttribution: meba commentedAlternative patch, using clever function to regenerate cache.
Comment #14
Darren OhNo patch attached.
Comment #15
Darren OhNothing to review until patch is actually attached.
Comment #16
maksimk CreditAttribution: maksimk commentedHello
seems that views_or does not support OR for arguments (user type view)
i have added this code to views_or_views_data_alter
but seems it does not work
it shows
Argument #2 is not an array in /home/www/balado_web/sites/all/modules/views_or/views_or_handler_argument.inc on line 142.
warning: Invalid argument supplied for foreach() in /home/www/balado_web/sites/all/modules/views_or/views_or_handler_argument.inc on line 142.
Comment #17
laVera CreditAttribution: laVera commentedComment #18
meba CreditAttribution: meba commentedAny reason to close this issue? It's still not fixed.
Comment #19
AlexisWilke CreditAttribution: AlexisWilke commentedmeba,
Where is your alternative patch? You never posted it!
Thank you.
Alexis Wilke
Comment #20
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedsubscribing
Comment #21
Darren OhSince this module is just a temporary solution until Views core supports alternative blocks, you can use a relationship to get it to work with non-node object types, as pointed out in comment #3.
Comment #22
Darren OhMerlin explained how to make a global handler.
Comment #23
chromix CreditAttribution: chromix commentedThe patch itself didn't work but after applying it manually I was able to add Views_or logic to arguments on a User view without a problem...! Great work Darren Oh.
Comment #24
kenjil CreditAttribution: kenjil commentedHad the same trouble. Applied patch of Darren Oh and solved. Thanks. Would be nice if it could be included in 6.x-1.dev.
Comment #25
zdean CreditAttribution: zdean commentedsubscribe
Comment #26
adam_c CreditAttribution: adam_c commentedI applied the code in the patch and I get the arguments.
However, it is adding 'WHERE' to the end of every query and if there there are no filters then it forms an erroneous query which in turn returns nothing.
Comment #27
adam_c CreditAttribution: adam_c commentedI found that I can avoid this behaviour if 'next alternative' is not set to share arguments.
However, this is now causing problems as i need it to share the argument
Comment #28
jrz CreditAttribution: jrz commentedI know its over a year ago, but I had the same problem until I cleared the Cache (#16).
Comment #29
elliotttf CreditAttribution: elliotttf commentedI can confirm the patch in #22 works for this purpose.
Comment #30
mikeytown2 CreditAttribution: mikeytown2 commentedI can also confirm the patch in #22 works!
Comment #31
Darren OhFixed in commit bf76e92. Thanks to everyone who reviewed this patch!