Skip to content

Remote storage issue #35706

@Nuranto

Description

@Nuranto

Preconditions and environment

  • Magento version 2.4.4
  • PHP8.1.7 (allow_url_fopen = ON)

Steps to reproduce

  1. Configure remote storage (S3, minio, ...)
  2. Upload an image in Stores > Configuration > Sales > Sales > Logo for PDF Print-outs (200x50)
  3. Place an order and invoice it
  4. Try to print invoice from backend

Expected result

PDF is generated

Actual result

Cannot create image resource. File not found." #1 Zend_Pdf_Image::imageWithPath() called at [vendor\/magento\/module-sales\/Model\/Order\/Pdf\/AbstractPdf.php:282] 

Additional information

I doubled checked : the file does exists. And the absolute url passed to Zend_Pdf_Image::imageWithPath is correct and gives a 200 when launched in browser. However, php -r "var_dump(is_file('http://s3.domain/path/file.jpg'));" does return false. (I don't understand why, it should work according to PHP doc)

Zend_Pdf_Resource_ImageFactory should be deprecated and replaced by a class which uses Magento\Framework\Filesystem\DriverInterface::isFile() instead of prohibited is_file. Maybe some other classes needs to be fixed as well.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: FrameworkComponent: RemoteStorageIssue: 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.4Indicates 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