In store config, "Design" tab, under "Emails", when I try to upload a logo, I have the error "Cannot gather stats! Warning!stat(): stat failed for /tmp/home/myproject/tmp/php9F5XEL". Other logos (favicon and header logo) works.
Same error here using MAMP PRO 3.4 on OS X 10.11.1; "Cannot gather stats! Warning!stat(): stat failed for /private/var/tmp/Applications/MAMP/tmp/php/phpVZ2ZJ8". It seems it's combining 2 separate paths "/private/var/tmp" and "/Applications/MAMP/tmp/php"...
Is this solve in magneto2 stable version?
No, the bug is in stable version.
i also can reproduce this. any solutions yet?
Thank you for reporting! We have created MAGETWO-50607 to track this issue internally.
Is there a workaround meanwhile?
I can modify the header template changing this code:
`
{{if logo_width}}
width="{{var logo_width}}"
{{else}}
width="180"
{{/if}}
{{if logo_height}}
height="{{var logo_height}}"
{{else}}
height="52"
{{/if}}
src="{{var logo_url}}"
alt="{{var logo_alt}}"
border="0"
/>
`
This part, src="{{var logo_url}}", is replaced by the logo URL. How can I call a Magento function API or something in order to retrieve the image from pub folder?
In a block, I can use $this->getViewFileUrl('images/logo.png'), that way, image is copied into pub folder then the getViewFileUrl method returns the full public path. Is there something similar for e-mail template?
Can you confirm where in the admin panel you are seeing the error? In our current develop branch I am able to edit any configuration under Content -> Configuration and successfully update any of the available logos.
@cspruiell

to reproduce i click browse (sfoglia) in the logo file input , then i select a png file from my filesystem and after it finish uploading, i click on the SAVE CONFIG BUTTON and i get the "Cannot gather stats!... " message.
@cspruiell ... i solved creating a sym link inside the /tmp folder... the bug is related to a /tmp prefix that is erroneously put in the upload method.
Can you give more details about that symlink? Thanks
@jaimestuardo
the cannot gather stats error means that the path is not accessible or doesn't exist, this is due to a bug in the magento core that adds /tmp to the upload path...
let's assume that you have this error:
"Cannot gather stats! Warning!stat(): stat failed for /tmp{{/path/to/php/tmp/folder}}"
you have to create a symbolic link into the /tmp folder and name /path , with target /path/to/php/tmp/folder ... in order to make the path accessible.
check also for writing permission for the magento daemon user.
Thanks.. you have given me the clue. This was the error in my case: Cannot gather stats! Warning!stat(): stat failed for /tmp/home/depasa/tmpsite/phpE9dnbP.
I saw that /home/depasa/tmpsite is the right path, so I have created a symlink in /tmp with name "home" but pointing just to "/home". That way, the problem was solved.
We are unable to reproduce this in v2.0.4 or in the current develop branch. Please use the provided workaround above if you continue to have this problem.
Cannot gather stats! Warning!stat(): stat failed for /tmp/opt/lampp/temp/phpadCXWZ
LAMPP with php 5.6.15
Magento 2.0.4
Attempted to save email logo
Cannot gather stats! Warning!stat(): stat failed for C:/Users/xxxx/AppData/Local/Temp/C:/xampp/tmp/php6F2.tmp
Magento 2.0.5 in developer mode
PHP 5.6.21
Magento EE 2.0.6. Same problem.
same problem ver 2.0.7
my quickest work around: edit php.ini and comment out upload_tmp_dir
some how if you don't have the image but the database contains the image mapping for the product then it will end up it this error. @magento-team you can replicate the issue by.
Magento Version 2.1.0
i) install sample data
ii) cd pub/media/catalog/product
iii) rm-rf *
While uploading email logo it say root folder location should be writable . kindly please say what are files to writeable while uploading logo
I can also confirm that this is STILL an issue with M2.3-Develop and believe it is because symlinking was disabled by a developer on my Windows site. Can anyone confirm? This error is showing for JS and CSS files also.