darkhoros VIP
Total posts: 152
21 Июнь 2015 08:48

Hi, When I create new fields with same lable I found that they get same key, this is causing me problems in filter module, lets say I have a filed that I named BATH_COUNT with select field type with numbers from 1 to 10 (it is named that way as I will use language overrides for it)

This field is created with same name for 3 types, now, lets say I have selected a value for 10 articles in type 1 and selected values for 3 articles in type 2 and none for type 3, now on filter module I have the option to change the type I filter by and fields should relate to that type, so when I filter by type 2 I expect to see the number beside the values of that fields to sum to 3 as there areo only 3 items in this type with values for this fields, but what I see is 13 which is the sum of all articles with values of this fields across all types, is that a normal behavior??

How do I adjust this behavior?

Thank you.

Последние изменения: 23 Июнь 2015


pepperstreet VIP
Total posts: 3,837
22 Июнь 2015 03:39

darkhoros I expect to see the number beside the values of that fields to sum to 3 as there areo only 3 items in this type with values for this fields, but what I see is 13 which is the sum of all articles with values of this fields across all types, is that a normal behavior??

I am afraid that is the normal behavior. Filter's "total count" numbers do not update on change. They show the total num on initial display only.


darkhoros VIP
Total posts: 152
22 Июнь 2015 08:28

Hi Pepper, Thank you for you reply, You missed my main point, my main point, why is new fields have same key as existing fields, although I am createing it from scratch? this is the thing that is causing my problem, I think!!

Why isn't the keys uniqe???

Thank you.


Sergey
Total posts: 13,748
23 Июнь 2015 06:19

There id field ID which is unique for every field. It means we do have unique reference for every field. Field key is a special field to identify same fields in different types. If we filter by field key, we are looking through all types in the same section that has such a field.

Regarding numbers, I should say that filter numbers are not dynamic. I mean it always show only real number of results by that filter, not taking in acount other filters applied. It means that filter may show 3 no matter what ather filters are selected. There is small dynamic there though. In many cases number may be affected but not always. We only created this count dymanic where it does not affect perfemance. Because those calcuation might really be a problem even on small sites.


darkhoros VIP
Total posts: 152
23 Июнь 2015 14:02

Hi, Can I change or edit key values across fields, I am asking as there is a couple of fields across several types are having same key value and causing issues in filtering, I tried adding or removing a letter from the key value using phpmyadmin, but when I do that the filter is gone and not showing in the filter module for this spacific type.

Thank you.


Sergey
Total posts: 13,748
23 Июнь 2015 15:42

Unfortunately you cannot alter keys in PMA. This will make all not working.

If keys create an issue for you, most probably you expect somehthing of filters which was never implied.

Give me link to the page where you are having an issue I'll have a look.

Работает на Cobalt