CRM-14588 Non Local Date format used in membership thank you and confirm contribution pages

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.7
    • Component/s: CiviMember
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Basically the same issue as https://issues.civicrm.org/jira/browse/CRM-10976 however this affects Civi Member. whilst on the page to fill out the data it formats it correctly on the thank you and confirm contribution pages it re-formats back to the american default (MM/DD/YYYY) I've tried having a look around but not sure exactly where this would need to be changed

        Attachments

          Activity

          [CRM-14588] Non Local Date format used in membership thank you and confirm contribution pages
          Mathieu Lutfy added a comment -

          I wasn't sure whether to go down the route of CRM-10976, but it seemed appropriate to fix it this way:
          https://github.com/civicrm/civicrm-core/pull/5729

          Rohan Ramesh Katkar added a comment -

          checked, working fine.

          Monish Deb added a comment - - edited

          There is a regression due to the PR changes in Activity's View form http://dmaster.demo.civicrm.org/civicrm/activity?atype=64&action=view&reset=1&id=625&cid=202&context=search&searchContext=activity&key=80d36efc25167b6bb15be68cc791d859_9139

          Fatal error: Call to a member function format() on a non-object in /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Form/Renderer.php on line 282

          Monish Deb added a comment - - edited

          I have improvised the fix and this is my PR https://github.com/civicrm/civicrm-core/pull/6106. Here the CRM_Utils_Date::setDateDefaults() provide two functionality which we need in this scenario :
          1) handle the time factor(if any) . Reason why I got the error on Activity view page where DateTime returns empty value coz the format mentioned as in 1st parameter isn't matching with the activity date-time value.
          2) pickup the formatType attribute in $element which got the the information of what would be the date + time(if any) format respectively.

          Mathieu Lutfy can you please verify my changes if it works for you?

            People

            • Assignee:
              Mathieu Lutfy
              Reporter:
              Seamus Lee

              Dates

              • Created:
                Updated:
                Resolved: