Content plugin: second copy (list) of same database table gets querystring filter from the first one

karilint

Member
Hi,

I have an Article which has two lists (ids 44 and 48):

{fabrik view=list id=44 tableX___id=-1}
{fabrik view=list id=48 resetfilters=1 showfilters=0 tableX___created_by_id=[$my->id]}

The first is basically for creating new entries (..._id=-1), the second one is supposed to list all records created by the user. (In my live site I've also used Tabs, but I do not want to confuse this question by adding that code <tab...>)

List 48 is created by 'Copy' from list 44.

As I open the page by setting fabrikdebug=1 into the codes above, the created query string are:
WHERE ( `tableX`.`id` = -1 )
WHERE (`tableX`.`id` = -1 AND `tableX`.`created_by_id` = 123)

So for the second list (id=48) I'm getting querystring from the first one (id=44). I've read from somewhere that two same lists (withs same id?) may mix these querystrings. That is basically why I created two separate lists to same database table.

Any ideas?

-Kari
 
That might be fixable (we do have some code in the plugin which attempts to clear the query strings between incantations, but it's a tricky issue) , but for now I'd suggest using pre-filters rather than query strings. That's one of the major advantages of list copies, is you can use different pre-filters on each, which tend to be a lot more robust than query strings.

-- hugh
 
Hi Hugh,

I set a pre-filter for my first list, after which the second one was also working. Later if I'll put another list to the Article, I need to set a pre-filter to the second list. Hopefully there will be a possibility to do this without pre-filters in the future, but this solution works for me at the moment.

Thank you again for your answer.
-Kari
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top