Date Field as filter, date are grouped per month, how to avoid grouping

More
10 years 4 weeks ago - 10 years 4 weeks ago #60813 by Chabi01
Hi again,
I have now a field "date" with multi values.
I put a flexi filter module on this field.
Then i have a little problem on the date format in the list : i can't see the full date but only values like this :
2016-01 (1)
2016-03 (2)
2016-06 (1)
....

How to get the "full" date, something that could be :
23/03/2016
?
Thanks :)
Last edit: 10 years 4 weeks ago by ggppdk.

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

More
10 years 4 weeks ago #60814 by ggppdk
Hello

there are 2 parameters for this
- parameter how to group (e.g. 2015-02-NN)
- parameter how to display (e.g you can use month name: February NN, 2015 )

and these exist for "category view" (content lists) and for search view
please read the popup description of the parameters


-- 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
10 years 4 weeks ago #60820 by Chabi01
Hi Georges,
I don't find this in the module. Do i am looking at the right place ?
Thanks :)

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

More
10 years 4 weeks ago #60821 by Chabi01
Found ! This is done directly in the field, not in the module :)
Thanks for your time Georges :)

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

More
10 years 4 weeks ago #60822 by Chabi01
Ho !
If i try "date selector, i get this !
Code:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%) ORDER BY i.created DESC, i.title ASC LIMIT 0, 10' at line 1 SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT i.id FROM #__flexicontent_items_tmp AS i JOIN #__flexicontent_types AS ty ON i.type_id = ty.id JOIN #__flexicontent_cats_item_relations AS rel ON rel.itemid = i.id JOIN #__categories AS c ON c.id = i.catid WHERE 1 AND ( i.state IN (1, -5) ) AND ( ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= UTC_TIMESTAMP() ) ) AND ( ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= UTC_TIMESTAMP() ) ) AND ( i.language LIKE 'fr%' OR i.language="*" ) AND ty.access IN (0,1,1,5) AND c.access IN (0,1,1,5) AND i.access IN (0,1,1,5) AND i.id IN (SELECT DISTINCT rel.item_id FROM #__flexicontent_fields_item_relations as rel WHERE rel.field_id=15 AND DATE_FORMAT(rel.value, "%Y-%m-%d") LIKE DATE_FORMAT('2016-03-23', "%Y-%m-%d") %) ORDER BY i.created DESC, i.title ASC LIMIT 0, 10

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

More
10 years 4 weeks ago #60823 by Chabi01
Also, if i put "%d %M %Y" in the custom format, i get the right thing (i.e. 03 January 2016) but where i can translate the "January" in french ? I have everywhere else the date in french but not in the list ?

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

More
10 years 4 weeks ago #60826 by ggppdk

Chabi01 wrote: Ho !
If i try "date selector, i get this !

Code:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%) ORDER BY i.created DESC, i.title ASC LIMIT 0, 10' at line 1 SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT i.id FROM #__flexicontent_items_tmp AS i JOIN #__flexicontent_types AS ty ON i.type_id = ty.id JOIN #__flexicontent_cats_item_relations AS rel ON rel.itemid = i.id JOIN #__categories AS c ON c.id = i.catid WHERE 1 AND ( i.state IN (1, -5) ) AND ( ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= UTC_TIMESTAMP() ) ) AND ( ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= UTC_TIMESTAMP() ) ) AND ( i.language LIKE 'fr%' OR i.language="*" ) AND ty.access IN (0,1,1,5) AND c.access IN (0,1,1,5) AND i.access IN (0,1,1,5) AND i.id IN (SELECT DISTINCT rel.item_id FROM #__flexicontent_fields_item_relations as rel WHERE rel.field_id=15 AND DATE_FORMAT(rel.value, "%Y-%m-%d") LIKE DATE_FORMAT('2016-03-23', "%Y-%m-%d") %) ORDER BY i.created DESC, i.title ASC LIMIT 0, 10


Hello

the custom format comes FROM language string
if language string is bad then SQL query will break


-- 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
10 years 4 weeks ago - 10 years 4 weeks ago #60827 by Chabi01
Hi again,
I didn't understand this Georges... :(
My 2 last questions are linked i think (the sql broken and the langage string) but how can i get rid of this ?
Note that if i use the simple dropbown list, i have not this issue.
Where can i check this langage strings ?
EDIT : you mean that if i remove the string in my format all will be fine ?
Last edit: 10 years 4 weeks ago by Chabi01.

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

More
10 years 4 weeks ago #60831 by ggppdk
Hello

about correct language it can be set with:
SET lc_time_names = 'fr_FR';

- we will retrieve current language from Joomla and execute the above
i though this was already done by Joomla ?

i will check and add it
i have opened this:
github.com/FLEXIcontent/flexicontent-cck/issues/497

will fix it,

about SQL error i will test our built-in language strings in english language file are good
- but anyway even if they are not in your case then you can just type a custom one


-- 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
10 years 4 weeks ago #60843 by Chabi01
Thanks again for your time Georges.
Where can i set the langage as you wrote with "Set lc_time_names" ?
In the module code ? in another place ?
To try to resolve this, i change the translation in GB_gb.ini of the language for Joomla but it didn't works (the format are retrieve in another file obviously).
Sorry to be so a "pain in the a..." Georges... :)

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