Closed (fixed)
Project:
Views Or
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2009 at 18:57 UTC
Updated:
18 Nov 2011 at 13:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
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 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 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 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 commentedActually, it's "users", not "user". Attaching a patch.
Comment #8
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 commentedI'm not running that proyect anymore, and don't know how to patch (yet)
Comment #10
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 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 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 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 commentedComment #18
meba commentedAny reason to close this issue? It's still not fixed.
Comment #19
AlexisWilke commentedmeba,
Where is your alternative patch? You never posted it!
Thank you.
Alexis Wilke
Comment #20
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 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 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 commentedsubscribe
Comment #26
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 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 commentedI know its over a year ago, but I had the same problem until I cleared the Cache (#16).
Comment #29
elliotttf commentedI can confirm the patch in #22 works for this purpose.
Comment #30
mikeytown2 commentedI can also confirm the patch in #22 works!
Comment #31
darren ohFixed in commit bf76e92. Thanks to everyone who reviewed this patch!