Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error by MAGMI Image attributes processor (Rename function)
 
NoNameMD
Jr. Member
 
Total Posts:  22
Joined:  2010-07-23
 

Hello,

MAGMI (v0.7.18) import is working fine, also with Image attributes processor (v1.0.25). But when I add “{item.sku}_{magmi.imagename}” or “{item.sku}_{magmi.imagename.noext}”.jpg to the field “Image Renaming”, I get the following error:

Frontend:
Image attributes processor v1.0.25 - error copying media/catalog/product/j/n/jn001-l-acye__magmi.imagename_ : 2,copy(/var/www/vhosts/mydomain.com/httpdocs/magmi/inc/../../media/catalog/product/j/n/jn001-l-acye__magmi.imagename_): failed to open stream: Permission denied

Console:
PHP Notice:  Undefined index: parsed in /var/www/vhosts/mydomain.com/httpdocs/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php on line 361

Can anybody help?
Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kab8609
Moderator
 
Avatar
Total Posts:  821
Joined:  2009-04-07
Cleveland
 

Have you been able to get this extension fo Magento working before?

Permission Denied error usually means the folder does not have the right permissions. What are the permissions to that folder?

I would also post a support request with Magmi since they might not be browsing these forums http://sourceforge.net/p/magmi/support-requests/?source=navbar

 
Magento Community Magento Community
Magento Community
Magento Community
 
NoNameMD
Jr. Member
 
Total Posts:  22
Joined:  2010-07-23
 

Yes, is worked before and is still working (I just did an import, leaving the “Image Renaming” field empty…

 
Magento Community Magento Community
Magento Community
Magento Community
 
kab8609
Moderator
 
Avatar
Total Posts:  821
Joined:  2009-04-07
Cleveland
 

So then what are the permissions to the folder that the image rename is taking place? Permission Denied error is almost always 100% caused by the system not having permissions in that folder to rewrite files.

Try to make that folder 777 and try again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NoNameMD
Jr. Member
 
Total Posts:  22
Joined:  2010-07-23
 

Deleted. See thread below…

 
Magento Community Magento Community
Magento Community
Magento Community
 
NoNameMD
Jr. Member
 
Total Posts:  22
Joined:  2010-07-23
 

Hi Kris,

I set the folder permissions of media/import and media/catalog to 777, cleared the database product tables (http://www.webguys.de/magento/produktdatenbank-leeren/) and the media/catalog/product folder. But all without success.

I just noticed that there actually are renamed images in media/catalog/product, but they are not renamed correctly:
e.g.: jn012-m-nygreherd__magmi.imagename.noext_.jpg

{magmi.imagename.noext} was not replaced. That fits to the console error:
PHP Notice:  Undefined index: parsed in /var/www/vhosts/mydomain.com/httpdocs/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php on line 361

Line 361 belongs to the following function (line 7 to be exactly):

public function getTargetName($fname,$item,$extra)
    
{
        $cname
=basename($fname);
        if(isset(
$this->forcename) && $this->forcename!=\\\"\\\")
        
{
            $extra
=$this->getImagenameComponents($fname,$this->forcename,$extra);
            
$pname=($extra[\\\'parsed\\\']?$extra[\\\'imagename\\\']:$this->forcename);
            
$cname=$this->parsename($pname,$item,$extra);
        
}
        $cname
=strtolower(preg_replace(\\\"/%[0-9][0-9|A-F]/\\\",\\\"_\\\",rawurlencode($cname)));
        
        return 
$cname;
    
}

Any idea?

 
Magento Community Magento Community
Magento Community
Magento Community
 
molgab
Jr. Member
 
Total Posts:  1
Joined:  2013-04-22
 

Try this “patch”:

Go to /magmi/plugins/base/itemprocessors/imageprocessor/imageitattributeemprocessor.php at line 302:

and change this

public function parsename($info,$item,$extra)
{
$info=$this->parseCalculatedValue($info,$item,$extra);
return $info;
}

to:

public function parsename($info,$item,$extra)
{
$info=$this->parseCalculatedValue($info,array_merge($item,$extra),array());
return $info;
}

And change your filename format: {magmi.imagename.noext} -> {item.imagename.noext}

This is not beautiful but working....

 
Magento Community Magento Community
Magento Community
Magento Community
 
lilycan
Jr. Member
 
Total Posts:  1
Joined:  2014-03-20
 

that’s the reason i sometimes can’t open my folder and upload to image processor. thank you for the codes above. i am having the same problem. will it also workable for this image processing application i am using. if so that would be wonderful.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top