• 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.

List prefilter on {$my->id} not working after update

uschmi

Member
After updating from 3.4.2 to 3.4.3 list prefilter on $my->id (to show the records of the current user) always shows an empty list. I tested this on several different lists and got always empty list views.

The prefilter is set at the menu item and is: where <useraccount> equals {$my-id} type <text>
This worked fine until updating to fabrikar 3.4.3.

Who can help?
 

Attachments

  • screenshot.PNG
    screenshot.PNG
    9 KB · Views: 244
Is 'useraccount' a user element or a dropdown? Is there a "useraccount (raw)" option on the field dropdown? If so, use the (raw) one.

Also, can you check the new "Overriden by menu/modules" setting? That defaults to "Yes", which is the legacy behavior, so menu/module pre-filters completely override the list ones. If it's set to No, then menu/module pre-filters will be applied in addition to list pre-filters. So if it's set to No, and you have some other pre-filter on the list, that could affect things.

-- hugh
 
thanks for quick reply cheesegrits!
Useraccount is a user element and I used element (raw) for pre filtering.
"Overriden by menu/modules" is set to "Yes".
I added a screenshot of the prefilter.

The prefilter is still not working.

Even if I replace {$my->id} hardcoded with an existing user id the corresponding records are not showing in list view.

The prefilter works fine if being placed directly in the list settings. But it works not while placed in the menu entry settings!!!
 
Last edited:
User element is now ok with the GitHub build343.zip

But on dbjoin elements it's vice versa, dbjoin and dbjoin(raw) are using the "value"

With menu prefilter "parent_id" it's creating WHERE ( LOWER(childlist.parent_id) = 'test text' )
I think it should be
WHERE ( LOWER(parentlist.field) =LOWER( 'test text' ))
 
OK, I'll take a look. I must confess I didn't actually test the join, I just applied the same fix (or what I thought was the same fix) I did to the user element.

Is that just with the menu prefilter?

-- hugh
 
Yeah, I see that. And I don't think that's anything to do with the new menuPrefilter type, looks like that's been that way for a while.

Working on it.

-- hugh
 
ok, list prefilter works fine (prefilter set in menu item too) now for me after updating to newest github!
Thanks for quick solution!
 
I won't do this work in the 343 branch, I'll just do it in the main branch. This obviously hasn't worked for ... well, probably ever ... and I don't want to be doing too much work on the 3.4.3 branch, really only fix anything which it broke in 3.4.2. As this issue predates 3.4.2, I'll just do it in joomla3.

About to commit a first attempt at a fix, although I'm trying to work out why we do a LOWER() in there ...

-- hugh
 
https://github.com/Fabrik/fabrik/commit/851a730559a18111a7c1978c20863b0f14cd3ac8

I'm just not sure why we do the ...

Code:
$key = 'LOWER(' . $key . ')';
$str = "$key $condition $value";

... so we compare lower cased key against not lower cased value. Which wouldn't have showed up till now, as it looks like non-raw prefilters on joins were never working, and raw prefilters would almost always be integers.

So the choice is either not do the LOWER($key), or also do a LOWER($value);

-- hugh
 
I just tested: LOWER/UPPER seems to have no effect on the search if the collation is case_insensitive xxx_ci (tested with =)

So the question is: in case of non_ci should the search ignore cases anyway (then LOWER on both sides) or should it be case sensitive (then no LOWER at all).
 
Hello

I have a similar problem. Still on joomla 3.4.8 I did the Fabrik update to the latest version. Couldn't find release notes so I gave it a try on a test site. It seemed to me that menu pre filters had gone. Wasn't sure if this was due to the backup and restore, so tried it on the productive site. Now same problem here. All the menu pre filters are empty.
I'm not sure where that info is stored in the dub therefore I don't know if the pre filters were deleted or can't be shown anymore due to some changes.

Will try to redo the pre filters manually tomorrow, if I can remember...

Other sites of mine use much more of these menu pre filters, I'm afraid of doing the update on those. Will Joomla 3.5 prevent that?

Thanks

Roger
 
I did the Fabrik update to the latest version
Which one: latest official Fabrik3.4.3 via Joomla updater or a GitHub update from joomla3 branch?

If your menu prefilter are totally gone it seems to be an other issue.

The menu prefilters are stored in the database in #_menu.params, you should see something like
Code:
..."prefilters":"{\"filter-join\":[\"AND\"],\"filter-fields\":[\"fabrik_user_reg.id\"],\"filter-conditions\":[\"greaterthanequals\"],\"filter-value\":[\"0\"],\"filter-eval\":[\"0\"],\"filter-access\":[\"1\"]}",...
 
Last edited:
Hello
The problem is definitely not the menu prefilter. I stumbled over the new feature inside the lists - data - prefilters where one can override the menu/modules. But I think this isn't either the problem. This new feature is what I would have needed when I created my application, but now I don't want to redo everything ;)

It seems to me that the problem is a prefilter that is not working in the same way as it did with version 3.4.2.
The following picture shows the prefilters with Joomla 3.4.8 and Fabrik 3.4.2 (the one from the fabrik homepage, not from github)
older version 3.4.2.JPG

The next picture is from Fabrik 3.4.3 (original, no github) and Joomla 3.4.8
prefilter.JPG

I deleted the yellow marked prefilter and then it works as desired except, that the people with the finance priviledges only see their own records. This prefilter was entered so that the finance guys see all records, not just their own.

When I set this up a couple of months ago I was told to enter a prefilter which is always true for the finance people, this worked fine until now.

Inside the menu prefilter there is nothing, it s empty at the moment.

Is there an easy way to fix that?

Thanks

Roger

P.S: can't move to Joomla 3.5 yet, my Joomlart template doesn't support it yet
 
relsog - I had similar problems. I have one list that uses joined tables and has 7 different Menu items using that same list - each with different prefilters. I can't say for sure if something in Fabrik changed it or I just overlooked it before, but it looked like some of the fields in my filters that should have been using raw values got changed.

Normally, you want to make sure you are using the raw values for the Fields - especially when you are comparing an element that is a numeric value (as defined in the mysql table).

E.g. If the value for the user_id is stored as an integer in the table, you should use 'No quotes' as the Type for {$my->id}.

Similarly, if the 1st and last filters in your filter list are making a numeric comparison (where you have 0 - zero - as the value) you should use 'No quotes' as the Type.
 
Last edited:
Thanks for the input, changed the settings as you described, still same problem.
So are you talking about the prefilters set up in the list configuration - or in the menu? If you have no prefilters set in the menu that displays the list, maybe you should try duplicating them in the menu?

All 7 of my menu prefilters are now working for that list - after I went through each and saved the menu again. Did you do a global Check-in? (I'm now using Joomla 3.5, Fabrik 3.4.3 with github update and PHP7) But I'm still confused with the status of github and not sure if I did it like Hugh recommended.

I have a feeling the Fabrik team is working diligently on getting this all straightened out, as everyone seems pretty quiet today. But don't ever take anything I say or recommend as gospel. I'm just another user trying to help where I think I can.

I have 3 or 4 other issues 'on the back burner' that have come up in the past few days that I don't even want to mention or 'complain' about right now, as they seem trivial - and Hugh, Rob, troester all seem to be pretty overburdened at the moment.
 
Hello

As I recall the problem with the menu prefilters was that there you can't use groups of filter criterias as you can in the list itself.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top