1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Conflict between date format in joomla search and fabrik?

Discussion in 'Community' started by MILORD65, Nov 1, 2019.

  1. MILORD65

    MILORD65 Member

    Level: Community
    Hello
    When I do a joomla search on a data recorded in fabrik I get for example:
    DateTime :: __ construct (): Failed to parse time string (February 8, 2019) at position 0 (8): Unexpected character.
    I checked on several data in fabrik and I get the same thing, but not on all of them. I think this is a conflict between the datetime format in fabrik and the creation date format in the joomla search. Has anyone noticed the same thing?
    Thank you in advance for your answers.

    JP
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    The Date tooltip says
    Although it's working on my site also with list and form format set to
    F d, Y H:i

    Did you select a date element for "Date" or a e.g. field or calc element containing a string?
     
  3. MILORD65

    MILORD65 Member

    Level: Community
    Hi,
    Thank you very much for your answer.
    The date format in my date element plugin for datetime (record creation) is Y-m-d H: i: s. In phpmyadmin the records have the correct date in YYYY-MM-DD format but very oddly the time (HH: MM: SS) remains on 00:00:00 whatever the recording time.
    For the joomla search in fabrik I didn't select a date element but I still have the error DateTime :: __ construct (): Failed to parse time string (February 8, 2019) at position 0 (8) : Unexpected character and I have no calculation field with a date.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Where can this February 8, 2019 be generated= Do you have any date element with format F d, Y?
    Which elements did you include in the Joomla search?
    Do you have more than one list with Joomla search enabled?
     
  5. MILORD65

    MILORD65 Member

    Level: Community
    Sorry but I may have misunderstood.
    The message displayed is actually "DateTime :: __ construct (): Failed to parse time string (27 février 2019) at position 0 (2): Unexpected character". The date is in French like the site and it is the format returned by the search joomla in the search results for records in the list and for the articles. For the fabrik list, it is the creation date of the records that is returned in the "creation date" of the results of the joomla search.
    The joomla search is active for a single list and only 2 fields in the list are searched and these two fields are not date fields.
    The error is only returned for some records. Whether or not I add in the joomla search to these 2 fields the datetime field of creation of the records the error remains the same.
    I get various errors for example for other records in this list on different dates: "DateTime :: __ construct (): Failed to parse time string (27 octobre 2019) at position 6 (o): The timezone could not be found in the database "
    Another anomaly: the creation date element (datetime format d-m-Y H: i: s) records in the list doesn't record the time remaining on 00:00:00 in the database.
    I do not understand anything anymore.
     
  6. MILORD65

    MILORD65 Member

    Level: Community
    Hello,

    I still have the same problem.
    In fact the error is totally random for the same list.
    For example if I search for "bébés" with joomla search I get the good results for the list (records containing "bébés") and the whole site.
    If I search in the same way "bébé" I get the error:
    DateTime::__construct(): Failed to parse time string (22 juin 2019) at position 0 (2): Unexpected character
    which corresponds to a date of a record of the list in which there is the searched word.
    Nobody understands what is happening ?
    Thanks for your help.

    jp
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    Try with Joomla "Debug System" enabled. This should show the call stack and may give a hint.
     
  8. MILORD65

    MILORD65 Member

    Level: Community
    Thank you for your quick reply.
    Activation of joomla debug can't indicate anything to me because only the error appears on the page once launched the joomla search.
    attached screenshot
    How to do ?
     

    Attached Files:

  9. MILORD65

    MILORD65 Member

    Level: Community
    Finally something new!
    After many tests... If I change the language of the site from French to English I have no more error in the search joomla looking for "bébé" for example.
    It seems that there is a problem with the date in French language?
    An idea ?
     
  10. MILORD65

    MILORD65 Member

    Level: Community
    Nobody for a solution to this bug?
     

Share This Page