A prefilter has been set up on an unpublished element...

troester

Administrator
Staff member
I get this message with any prefilter added in a menu item

but the element is published and the list is prefiltered as expected
-----------------------------------------------------------------
Other setup:
prefilter in list settings on a userid-element in a joined table
objekte.Anbieter(raw) EQUALS {$my->id}
gives
A prefilter has been set up on an unpublished element, and will not be applied:`objekte_0`.`userid`
(Anbieter is the label of userid)
This prefilter is really not applied.

Changing the prefilter to the "non-raw" version
objekte.Anbieter EQUALS {$my->name}
is working (but I have to ensure that name is unique)
 
I can't replicate the first issue, pre-filters I apply on menu items are working fine.

What is weird is, according to my reading of the code, if that message is generated, then the pre-filter really should not be applied. Right after that warning is raised, we do a 'continue' in the loop that adds items to our main filter array, and it should never get added to the filter array.

I haven't tried the second case, as Id like to work out the simpler issue first, as the two may well be related.

Ping me in the group chat when you wake up. :)

-- hugh
 
Ok, I can't replicate the first issue on my testsite:(
But I've set up 2 examples for issue no 2:
menu item prefilter on xxx(raw)=$my->id --->error
menu item prefilter on xxx =$my->name ---ok
(it's the same with prefilter direct in list settings)
 
I can't replicate either issue. :(

Just tried adding a menu pre-filter, on a userid(raw) from a joined table, no problems.

http://screencast.com/t/bbTrr6Y3LSJ

It's not real clear from the video, but I tried to show it in Eclipse, hitting a breakpoint in the filter building code, and NOT executing that chunk of code that would output the "unpublished" warning.

It's working, and showing me the two rows I would expect to match on my logged on test user. No error messages.

Hmmm.

-- hugh
 
The example is on MySite (you should log in to get a row in the prefiltered list).
This is my setup:
List reservation contains a dbjoin element j_objekte (to table objekte, which contains the userid) + a left join from reservation to objekte, reservation.j_objekte = objekt.id
(so I can access all elements from objekte without adding additional elements (CDD or autofill) to reservation - old open point).

This will give two joins
LEFT JOIN `objekte` AS `objekte` ON `objekte`.`id` = `reservation`.`j_objekt` LEFT JOIN `objekte` AS `objekte_0` ON `objekte_0`.`id` = `reservation`.`j_objekt`

and if the prefilter is set on "userid(raw)" the error message is "...not be applied:`objekte_0`.`userid"
So it seems at some point the table alias `objekte_0` is not taken into account correctly.

But the issue doesn't have high priority
I can work around by prefilter on the non-raw element
(or I assume by "turning" the lists, joining objekte to reservation...)
 
I had another look at this one.

I'm a little confused because on the backend on the test site, I don't see the list join to j_objekt on either version of the reservation List?

-- hugh
 
i'm getting this same thing after updating from a very old svn from about 3 months ago (that i found to be stable for my production app... so it's been a long while...) to the current svn.

i too am using a element (raw) with {$my->id} in a menu prefilter.
in my case i have a 2nd element ANDed with the first that is not (raw). but both elements are shown in the notice (and both are published of course).

and i too have a left join to another table in my list. however both of the elements below (status and assigned_to) are in the main table and the other table being left joined is not a factor at all.

on mine too, the list is correctly filtered. so the only 'error' is that the notice appears at all.

notice is:
Notice

A prefilter has been set up on an unpublished element, and will not be applied:`sf_lead`.`status`
A prefilter has been set up on an unpublished element, and will not be applied:`sf_lead`.`assigned_to`

but i don't think it's related to the (raw). Ff i remove all filters, then add the simplest of pre-fileters like id is not equal to 0, i still get the notice on the id. so it's happening on every prefilter in my case.
in my case i'm on latest (joomla 3.2.2) and php 5.4.6 if that explains why troester and i are seeing it and you're not.
 
ok, fixed it on the main menu, but still getting it here (when clicking on the related data link in the form where you fixed it):
http://www.skyrun.com/skyforce/test...4=0&resetfilters=1&fabrik_incsessionfilters=0

and also here when you display the detail of one of the leads from the list:
http://www.skyrun.com/skyforce/test/my-leads/form/3/840

both use the main menu prefilters, (hence the /my-leads/ in the path) however they view other things than the main list where you fixed it (a form in one case, another list in the other case).
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top