• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Override menu prefilter not allowing "OR" statement after latest update

p38

Active Member
Hi All, This always used to work as expected, but lately, it has stopped after latest update from GIT.

If I use a list on a menu item, and select Menu Override "NO" for prefilters, I noticed that the merging of the 2 prefilters (list and menu) does not adhere to the OR option selected. (see attachment).

I set the menu prefilter to append an OR statement, but looking at the debug , it always adds an "AND" statement.

Has anyone else found this issue?

Paul
 

Attachments

  • prefilter issue.png
    prefilter issue.png
    128.3 KB · Views: 161
I'm looking at it at the moment, see if I can replicate. I can't think of anything which has changed which might effect it, but ... we'll see ...

-- hugh
 
Hmmm, as far as I can tell, that behavior (of always joining list prefilters and menu prefilters with AND) has always been the same. It's done here:

https://github.com/Fabrik/fabrik/blob/master/components/com_fabrik/models/list.php#L3545

... which was committed back in Feb 2016, when we first added the option as to whether menu prefilters would override or add to list prefilters (up till then, they just overrode them):

https://github.com/Fabrik/fabrik/commit/0e09d0ca63e44a2c62aaa8e07042b8512bf57a12

It should be possible to do what you are expecting it to do, but I don't think it ever did.

I need to think about this, as changing that code could potentially cause problems with other people's filters, if they've been relying on the existing behavior, which is to ignore the "join" setting on the first menu prefilter, and always use AND. So if they have it set to OR (which currently doesn't have any effect), and it suddenly starts really doing an OR, it could display rows they really don't want to display.

What I might do is think about either adding an extra setting on the list, along with "Overridden by menu/modules", to specify "Combine with: AND / OR". Or change the "Overridden by menu/module" to be "Combine with menu/modules: No (gets overridden) / Combine with AND / Combine with OR".

-- hugh
 
Hi Hugh, I must confess I have used this menu override feature on too many apps to recall if I specifically used "OR", and perhaps if I did, I am sure there are some customer lists that are not displaying correctly, but never picked up by my customers.

I agree with your last suggestion as it is the safest for backwards compatibility and as you said, wont impact any setups currently.

If you are able to fix this it would be appreciated, come to think of it, once fixed, I have some apps I need to revisit. :)

Many thanks Hugh,

Paul
 
I'll put it on the list of things to look at doing. I can't give an ETA. Unless someone steps up to fund the work, it'll get done when we need it for one of our projects. That's kind of how all new Fabrik features and options happen.

-- hugh
 
If you can point me in the right direction where to change it, I will gladly do it. Alternatively would a month standard subscription suffice?
 
We're not going to be doing "all you can eat" subs any more. We've been losing money on that for a while now. We're moving to a "pay as you go", hourly system.

If you can point me in the right direction where to change it, I will gladly do it.

You mean the code that adds the AND? I pointed at that in a previous post. Although I strongly advise not messing with it. Even I'm not 100% sure that's the only place in the code that needs changing, or that there won't be weird and unpredictable side effects. It's one of those things I need to change here, and test for a few days before letting it loose.

-- hugh
 
thanks Hugh, will monitor the thread to pick up when you had a chance to look at it.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top