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

Wrong image URI when content name has extended UTF characters

    Details

      Description

      When a content (e.g article) has a name that includes extended characters (e.g. À,ß,Ç, etc) and an image is uploaded into an ezimage FieldType, the image URI is wrong.

      Steps to reproduce:

      • Start by editing site.ini.append.php and adding:

      [URLTranslator]
      TransformationGroup=urlalias_iri
      

      • Clear legacy cache afterwards;

      Case 1:

      1. Create an article called "ÀßÇЀƒ" and upload an image to the "Image" field;
      2. Open the article in the frontend and check the image URI: example.com/var/ezdemo_site/storage/images/tests/àßçð€ƒ/712-1-eng-GB/_articleimage.png

      This is wrong. The image name is "_articleimage.png", should be "ÀßÇЀƒ_articleimage.png"

      Case 2:

      1. Create an article called "ÀßÇ.Ѐƒ" and upload an image to the "Image" field (note the dot between "ÀßÇ" and "Ѐƒ");
      2. Open the article in the frontend and check the image URI: example.com/var/ezdemo_site/storage/images/tests/àßç.ð€ƒ/712-1-eng-GB/.Ѐƒ_articleimage.png

      This is wrong. The image name is ".Ѐƒ_articleimage.png", should be "ÀßÇ.Ѐƒ_articleimage.png"

        Issue Links

          Activity

          Hide
          Gunnstein Lye added a comment - - edited

          Confirmed in the frontend as described. Works correctly in the backend. That seems to mean this affects new stack, not legacy. (The TransformationGroup setting is the same in all site accesses.)

          Show
          Gunnstein Lye added a comment - - edited Confirmed in the frontend as described. Works correctly in the backend. That seems to mean this affects new stack, not legacy. (The TransformationGroup setting is the same in all site accesses.)
          Hide
          Gunnstein Lye added a comment - - edited

          The problem is that pathinfo() fails to read the filename because the locale is not correctly set. When added to the unit test the same code passes, as locale is correctly set in that context.

          Show
          Gunnstein Lye added a comment - - edited The problem is that pathinfo() fails to read the filename because the locale is not correctly set. When added to the unit test the same code passes, as locale is correctly set in that context.
          Hide
          Rui Silva (Inactive) added a comment - - edited

          PR approved by QA for 5.4 and platform master.
          Cannot be tested on platform so sanity tests were executed on the scope, and the following issue was raised: EZP-26981.
          Sending back to dev-needed so that PR can be merged.
          Please send to QA again afterwards, so that Support Team can be informed.

          Show
          Rui Silva (Inactive) added a comment - - edited PR approved by QA for 5.4 and platform master. Cannot be tested on platform so sanity tests were executed on the scope, and the following issue was raised: EZP-26981 . Sending back to dev-needed so that PR can be merged. Please send to QA again afterwards, so that Support Team can be informed.
          Hide
          Gunnstein Lye added a comment -
          Show
          Gunnstein Lye added a comment - Merged in eZ Platform 1.7(.2), 1.8(.1), master (1.9): https://github.com/ezsystems/ezplatform/commit/45aa9a67015f33956501a33fe5517fee1b2b58ca
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA.

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 2 days, 6 hours
                2d 6h