Skip to content

Favicon Icon upload form in Magento does not actually support .ico file types #34858

Closed
@ksenia-zlotin

Description

@ksenia-zlotin

When attempting to upload a favicon file of .ico extension type in Magento admin, Magento will not deem the file as valid.
Tested on a clean composer install of Magento 2.4.3-p1 with a PHP version of 7.4.13.

Perhaps the usage of PHP's imagecreatefromstring causes for an .ico file type to always be deemed invalid by Magento. The exception is thrown: "Warning: imagecreatefromstring(): one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
in /var/www/html/vendor/magento/module-media-storage/Model/File/Validator/Image.php on line 64"

Preconditions (*)

  1. Unaltered, clean install of Magento version 2.4.3-p1
  2. PHP version 7.4.13
  3. DBMS: MySQL (ver. 5.5.5-10.2.40-MariaDB-1:10.2.40+maria~bionic)
    Case sensitivity: plain=exact, delimited=exact
    Driver: MySQL Connector/J (ver. mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0), JDBC4.2)
    Effective version: MariaDB (ver. 10.2.40)
  4. Chrome browser version Version 96.0.4664.110 (Official Build) (x86_64)
  5. MacBook Pro - OS: Catalina 10.15.7

Steps to reproduce (*)

  1. Login to Magento admin
  2. Navigate to Content -> Design -> Configuration
  3. Click 'Edit' on any of the records shown in the grid
  4. Scroll to 'Other Settings'
  5. Expand 'HTML Head'
  6. Under the 'Favicon Icon' section, click 'Upload'
  7. Select a valid .ico file, click 'Open'

Expected result (*)

  1. It should provide a preview of the icon below the upload form and allow for the admin user to save the configuration settings.

Actual result (*)

  1. An error was shown to the admin:
    image

Metadata

Metadata

Assignees

Labels

Area: UI FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.3-p1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions