Content plugin doesn't filter data

Jaanus

Super Moderator
As I test a possible footer (or "outro") for form/details I tried also displaying list data with form intro (and possible outro).

Yes, it displays list but doesn't filter the data. Not in form intro, not in articles. All data is displayed.

I used the following code:
{fabrik view=list id=2 teos_mus_vers___teos_mus_id=[rowid]}
where [rowid] is the current form/details pk value.

(when tested in article, I wrote 4 instead of [rowid])

Such code worked very well in Fabrik 2, both in form intro and display element.
 
OK, I think this is "fixed".

AFAICT, the problem would have been restricted to elements that aren't created manually, like building a list from an existing table, or on the 'id' and 'date_time' we create automagically on new lists, and which haven't subsequently been edited and saved. We were setting the filter_access param to 0 (which isn't a legal access level) when auto-creating elements, where it should have been 1 (public).

I've changed it so the default on auto-created elements is now 1, and added some corrective code so if we see a filter_access level of 0, we change it to 1.

Let me know if latest github fixes it for ya.

-- hugh
 
It's an access problem (filter is ok if logged in as superadmin), but it isn't fixed;
On the one list where it isn't working I've changed and resaved the id access settings, the #_fabrik_element has access=1

content filtering and URL filtering is not working

fabrikdebug is showing WHERE (1=1)

setting a prefilter (in menu item, in list options it is not working, see other thread) I get
WHERE ( test.id < 20 ) AND ( 1=1 ) with theadding &test___id=3 to the URL

(all is ok when logged in: WHERE ( test.id < 20 ) AND ( `test`.`id` = 3 ) )
 
The problem on my tests wasn't with the ACL's on the element itself, it's with the 'filter access', under the list tab, filter settings.

-- hugh
 
Yup, that's it;
so because I had saved the id element (with filter access set to admin - first in alphabet) filteracces was not longer 0;
I've tested with resetting it to 0 in database params ->content it's ok then.

But if filter_access =0 it's still inserting admin (or whatever) access in the filter_access dropdown and saving the such an "old" id or date element will "fix" this access level.
So there should be some defensive code during element load or save.
 
Yeah, I looked at that last night. It'd have to happen when loading the element edit page, and the trouble is, the way back end params are set up, it's very difficult to add any kind of exceptions.

So at least for now, I've done about all I can do to improve the situation.

-- hugh
 
Yeah, had to make some update queries.
Another issue occurred.
I show list data on a fabrik details view with content plugin code using my new "outro" field.

Everything is ok when I use this forms [rowid] as the filtering value. But when I use any other form field then the list view displays nothing although the query is correct and returns right data in phpmyadmin.

{fabrik view=list id=4 teos_roll_nimi___teos_mus_vers_id=[rowid]}
displays data.

{fabrik view=list id=4 teos_roll_nimi___teos_mus_id=[teos_mus_vers___teos_mus_id_raw]}
displays nothing.

As I don't need the [rowid] value in this case I tried
{fabrik view=list id=4 teos_roll_nimi___teos_mus_vers_id<>[rowid] teos_roll_nimi___teos_mus_id=[teos_mus_vers___teos_mus_id_raw]}
but it didn't help. And strange: <>[rowid] was replaced this time with = ''

What's wrong?
 
Hi,
Happens to me as well, with [rowid] yes it works, but with [tablename___fieldname] does not work.
Any idea?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top