VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jurabaz on November 01, 2013, 14:41:25 PM

Title: [solved] bug in product edit from frontend
Post by: jurabaz on November 01, 2013, 14:41:25 PM
When I login as super admin into frontend, VM 2.0.24 suggest to edit product, but when I click to "pencil", appears error "vmError: Missing Flag ../media/mod_languages/images/en.gif".
Seems error in  \administrator\components\com_virtuemart\helpers\vmview.php

line 271: $image_flag="../media/mod_languages/images/".$img.".gif";

This file is shared between front- and backend and when it called from frontend, links should begin from one dot, not from "../"
Title: Re: bug in product edit from frontend
Post by: Milbo on November 01, 2013, 16:30:00 PM
I think this error is more connected to the language flags problem in common. You must create in the joomla language manager a content for all your languages.
Title: Re: bug in product edit from frontend
Post by: jurabaz on November 03, 2013, 11:20:59 AM
Actually file  /media/mod_languages/images/en.gif - exists and all other multilingual features works, including product edit in both languages in backend.
Language Manager - two languages in all tabs, including  content - English (UK), en-GB, en, en and Suomi, fi-FI, fi, fi
VM config / shop / Multilingual shop -  both languages.

Can somebody edit product from frontend in multilingual shop?
Title: Re: bug in product edit from frontend
Post by: sscheidegger on November 29, 2013, 17:28:04 PM

We have the same problem with VM 2.0.22e on a multi lingual Joomla site. When we try to edit a product from the frontend, we get the message

vmError: COM_VIRTUEMART_MISSING_FLAG

or

vmError: Missing Flag ../media/mod_languages/images/de.gif for language German (DE-CH-AT).
Go to Extensions > Language Manager > Content, and check the parameter Image Prefix for this language.


and we cannot save any changes to the product. Joomla and VM are fully configured for English and German. The error happens for all VM products, it doesn't matter if the products have a description in only one or in all languages.

Any suggestions?
Title: Re: bug in product edit from frontend
Post by: Romy_Magick on December 02, 2013, 20:46:16 PM
Got the same bug by visiting configuration tab in backend in version 2.0.24c
solved it by creating the missing flag.

Go to: Extensions -> Language -> Content

in my case there was only a entry with "English (UK)".
Now create new one and name it "German (DE-CH-AT)"
copy that into box below. Now go through following:
1. de
2. de
3. de-DE

At least I set "Admin/Author" as acess level (or named similiar - I'm using german interface)
Title: Re: bug in product edit from frontend
Post by: Milbo on December 03, 2013, 11:00:29 AM
Yes exactly and it is not a bug. It is an hint that the joomla administrator missed todo something.
Title: [solved] bug in product edit from frontend
Post by: jurabaz on December 09, 2013, 10:14:11 AM
When I change ".." to "." near line 271 of \administrator\components\com_virtuemart\helpers\vmview.php

$image_flag="../media/mod_languages/images/".$img.".gif";
// begin jurabaz
if (!file_exists ($image_flag)) {
       $image_flag=substr($image_flag,1);
}
// end jurabaz
if (!file_exists ($image_flag)) {

error COM_VIRTUEMART_MISSING_FLAG disappeared, but product names still not updated during language switch. It can be say problem solved.

In backend all correctly - product names updates accordingly when I switch languages via drop-down menu.
Title: Re: bug in product edit from frontend
Post by: sscheidegger on December 10, 2013, 11:24:43 AM
Quote from: Milbo on December 03, 2013, 11:00:29 AM
Yes exactly and it is not a bug. It is an hint that the joomla administrator missed todo something.
If you think that it's not a bug, could you please explain what I (the administrator) need to do? We have a bilingual website with Joomla and Virtuemart working fine. And in Extensions -> Language -> Content we do have both languages:
English (UK)
English (UK)
en-GB
en
en

and
German (DE-CH-AT)
Deutsch
de-DE
de
de

Also the .gif files for those languages exist.

In the BE we can edit products in both languages no problem. But in the FE we get the error messages and we cannot save any changes.


Title: Re: [solved] bug in product edit from frontend
Post by: Milbo on December 10, 2013, 18:09:44 PM
Ahhsooo
it is working correctly for the BE, but not FE. Hmm.
Title: Re: [solved] bug in product edit from frontend
Post by: Milbo on December 10, 2013, 19:11:09 PM
Please test http://dev.virtuemart.net/attachments/download/666/com_virtuemart.2.0.25f_extract_first.zip
Title: Re: [solved] bug in product edit from frontend
Post by: alatak on December 10, 2013, 19:54:52 PM
Hello
$image_flag="../media/mod_languages/images/".$img.".gif";
I have added a absolute path instead
$image_flag=JPATH_SITE." /media/mod_languages/images/".$img.".gif";

Title: Re: bug in product edit from frontend
Post by: jurabaz on December 12, 2013, 20:13:35 PM
Quote from: sscheidegger on November 29, 2013, 17:28:04 PM

and we cannot save any changes to the product.

Any suggestions?

For saving changes in FE try turn off SEF, see http://forum.virtuemart.net/index.php?topic=116998.msg394867#msg394867 reply #7

Actually it was three problems in FE on my site:
- error with icons. Solved.
- can not save products. Solved by turning off SEF
- product names and flags not changed when switch languages. Still not working, but it is not critical to me. Maybe reason is in many instances of jQuery.
Title: Re: [solved] bug in product edit from frontend
Post by: sscheidegger on December 23, 2013, 13:49:14 PM
It seems that all the three problems have been resolved in VM 2.0.26.

Thanks a lot!