Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26148

String length validation error contains %-symbols

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 1.5.0
    • None
    • None
    • None

    Description

      Example: The string can not exceed %42% characters. - the %'s shouldn't be there. The translation parameters are not %-wrapped, which means the %'s that exist in the translation string won't be removed when parameters are inserted.

      These strings end up in the Symfony Translator which uses http://php.net/manual/en/function.strtr.php and that makes no assumptions about %'s, it simply replaces strings verbatim. So if strings are %-wrapped in the translation string, they must also be so in the parameters: http://symfony.com/doc/2.7/components/translation/usage.html#message-placeholders

      The kernel fix for this triggers an error in repository-forms, which does automatic %-wrapping. The repository-forms PR fixes this.

      STEPS TO REPRODUCE (REST):

      • Use a content type with a textline that has min/max length set
      • Using REST, create a content of this type, submitting a string of invalid length for the textline
      • See that the error message in the REST response has %'s around the integer value

      STEPS TO REPRODUCE (REPOSITORY-FORMS)

      Attachments

        Activity

          People

            Unassigned Unassigned
            gunnstein.lye@ibexa.co Gunnstein Lye
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 6 hours, 15 minutes
                1d 6h 15m