Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-2979

No picture is imported in a content after copy/paste from an external webpage with images

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.2.3, 3.3
    • 3.2.2
    • Inline Editor
    • None
    • IE9, FF3.3.6

        [CMS-2979] No picture is imported in a content after copy/paste from an external webpage with images

        Ther's actually two issues in this one :

        • When a non-absolute URL is copied with IE, it is not absolutized, so the target system (Ametys here) can't do anything with it. It is fine with FF which absolutize the URL with the server scheme, name and port.
          This issue is a limitation of IE, and we can't fix anything.
        • When copied from FF, the particular image you mentionned ended with ".png_244*450" which is obviously not a known extension, thus leading to 0-byte image when getting through the ImageHelper.
          The fix forces format to be "png" when not recognized.

        Cédric Damioli added a comment - Ther's actually two issues in this one : When a non-absolute URL is copied with IE, it is not absolutized, so the target system (Ametys here) can't do anything with it. It is fine with FF which absolutize the URL with the server scheme, name and port. This issue is a limitation of IE, and we can't fix anything. When copied from FF, the particular image you mentionned ended with ".png_244*450" which is obviously not a known extension, thus leading to 0-byte image when getting through the ImageHelper. The fix forces format to be "png" when not recognized.

        The image appears properly in the inline editor.
        It is deleted after saving

        Gauthier Ubersfeld added a comment - The image appears properly in the inline editor. It is deleted after saving

        Indeed, it does not work with this picture.
        We can't actually fetch images which URL is not absolute : the URL of your exemple is "/_contents-images/ametys%253Asites/ametys.org/ametys-internal%253Acontents/presentation-cms-ametys-article/_metadata/content/_data/AwT_ametys_brochure_recto_schema.png_244x450" and does not begin with "http://www.myserver.com/XXX"

        The image does not show in the inline editor as well, does it ?

        Cédric Damioli added a comment - Indeed, it does not work with this picture. We can't actually fetch images which URL is not absolute : the URL of your exemple is "/_contents-images/ametys%253Asites/ametys.org/ametys-internal%253Acontents/presentation-cms-ametys-article/_metadata/content/_data/AwT_ametys_brochure_recto_schema.png_244x450" and does not begin with "http://www.myserver.com/XXX" The image does not show in the inline editor as well, does it ?

        Try to paste the main picture of http://www.ametys.org/fr/cms-ametys/presentation-cms-ametys.html, then save.

        Gauthier Ubersfeld added a comment - Try to paste the main picture of http://www.ametys.org/fr/cms-ametys/presentation-cms-ametys.html , then save.

        could you give more information so that we can reproduce the problem ?

        Cédric Damioli added a comment - could you give more information so that we can reproduce the problem ?

          cedric Cédric Damioli
          gauthier Gauthier Ubersfeld
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

            Created:
            Updated:
            Resolved: