VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: dergy on August 13, 2011, 10:41:07 AM

Title: com_virtuemart_media_no_path_type
Post by: dergy on August 13, 2011, 10:41:07 AM
where I need define this and how to
Title: Re: com_virtuemart_media_no_path_type
Post by: jjk on August 13, 2011, 12:36:43 PM
Without any further information about where you see this line, it looks like a missing string in the backend language file:
yoursitename\administrator\language\en-GB\en-GB.com_virtuemart.ini

Approximately around line 791 (In my VM2 version from the SVN trunk) there should be this line:
COM_VIRTUEMART_MEDIA_NO_PATH_TYPE="Media of type %1$s has no relative URL set, Please <span style='text-decoration:underline'><a href='%2$s' title='go to configuration'>configure it first</a></span> and come back here."

The part before the "=" sign is displayed if the text right of the "=" sign is missing.
Title: Re: com_virtuemart_media_no_path_type
Post by: dergy on August 13, 2011, 12:58:50 PM
yes, but this display me as error message - where is defined path for media?
Title: Re: com_virtuemart_media_no_path_type
Post by: jjk on August 13, 2011, 13:33:09 PM
Configuration - Shopfront - Media Files Settings
The paths should be set like this:

components/com_virtuemart/assets/
images/stories/virtuemart/category/
images/stories/virtuemart/product/
images/stories/virtuemart/manufacturer/
Title: Re: com_virtuemart_media_no_path_type
Post by: dergy on August 13, 2011, 14:47:37 PM
jjk true ;) thank you

(missed slash at end)
Title: Re: com_virtuemart_media_no_path_type
Post by: lamvt on August 24, 2011, 09:47:39 AM
Sugeesion:
for this files: mediahandler.php
** EDIT: link removed **
Line 41 like that:
if($type == 'product' || $type == 'products'){
$relUrl = VmConfig::get('media_product_path');
$choosed = true;
}

Replace with:
if($type == 'product' || $type == 'products'){
$relUrl = trim(VmConfig::get('media_product_path'));
if($relUrl==""){
$relUrl = "images/stories/virtuemart/product/";
}
$choosed = true;
}


Do the same way for line 59 to 71
sory for my bad english
** EDIT: Please respect the forum and community and do not advertise in posts **
Title: Re: com_virtuemart_media_no_path_type
Post by: Milbo on August 24, 2011, 21:45:24 PM
yeah your solution is a nice quick dirty hack, but that should do the VmConfig object. try the version in svn, which works correct.