Field problem:- select List - custom filter values retrieval

More
12 years 9 months ago - 12 years 3 months ago #35643 by gauthier
FLEXIcontent version 2.0.1 (r1659)

Since the last update I have a problem with one field - select List -
I have configured:
- Use SQL query
- Frontend display -> label
- Display non-selected values -> yes ==>ok
-> no ==> error 500 on the page
- Remove space: no
- Custom Retrieval of Filter Values -> use custom query

I tried several options but it seems that something going wrong with "display non-selected values" to no.

I tried with an other new template and the problem was the same.

Could help to fix that problem? Thanks

---edit
And I have FLEXI_FIELD_INVALID_ELEMENTS when I tried to use the filter
Last edit: 12 years 3 months ago by gauthier.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #35654 by ggppdk
Hello,
i will add the language string to frontend too, as now it exists in backend only ...

FLEXI_FIELD_INVALID_ELEMENTS="There was an error while parsing element values set in field configuration"

Does SQL query correct ? did you test it in phpMyadmin ?
can you give it here:

Also, in Filter Values Creation try using "All Field Values"


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #35690 by gauthier
yes, the request works fine. (and was working for a while)
Code:
SELECT DISTINCT `id` AS value, `title` AS text FROM `#__content` INNER JOIN `#__flexicontent_cats_item_relations` ON `#__flexicontent_cats_item_relations`.itemid = `#__content`.id WHERE (`#__flexicontent_cats_item_relations`.catid = '27' OR `#__content`.id =37 OR `#__content`.id =30) AND `#__content`.state =1 ORDER BY `title`

When I am generating the index I have this error:
Code:
1580 / 1773 items Error in field: Lead Member Firm while splitting element: SELECT value, value as text FROM #__flexicontent_fields_item_relations WHERE field_id='{field_id}' AND value != '' GROUP BY value properties needed: 2 properties found: 1 [7.98 secs]

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #35694 by ggppdk
Hello,
-- The problem is that it incorrectly tries to parse the SQL query instead of executing it, some parameter value checking is wrong, i ll find and fix

Please do this (if you have not tried it already):
-- in Filter Values Creation try using "All Field Values"


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #35704 by gauthier
Thanks,

Changing the option as suggested, removed the error message.

Don't hesitate to PM me if you need to test the fix.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #35739 by ggppdk
This would be easy to fix the parameter is not respected, an -IF- statement is wrong

Added to the TODO list for v2.0.2 (also note another user reported the issue at about same time as you)

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #36023 by gauthier
Any news about the next release or at least having a way to have the patch for this problem?

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #36037 by ggppdk
Hello,
if i remember correctly the fix was:

In file
components/com_flexicontent/classes/flexicontent.fields.php
inside function:
indexedField_getElements()
find:
Code:
$sql_mode = $filter_customize_options==2;
and replace with
Code:
$sql_mode = $filter_customize_options==1;


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #36069 by gauthier
No I don't think it is for my problem, I tried the patch and I didn't saw a difference. I guess it is to fix the filter problem.

On a select list field when I select Display non-selected values, the display works fine but if I set no, I have an error as described at the beginning of the post. The sql request to retrieve the text of values seems not to be executed properly.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #36081 by brandonking
Hello,

I have selectmultiple field and configured as follow but I don't get any error :
- Use SQL query -> No
- Frontend display -> label
- Display non-selected values -> yes ==>no problem
-> no ==> no problem
- Remove space: no
- Custom Retrieval of Filter Values -> No, use all values


There are two different settings(written in bold) so...
@ggppdk Maybe you have to check Use SQL query section.

Regards

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save