News:

Support the VirtueMart project and become a member

Main Menu

[solved] bug in product edit from frontend

Started by jurabaz, November 01, 2013, 14:41:25 PM

Previous topic - Next topic

jurabaz

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 "../"

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jurabaz

#2
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?

sscheidegger


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?

Romy_Magick

#4
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)

Milbo

Yes exactly and it is not a bug. It is an hint that the joomla administrator missed todo something.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jurabaz

#6
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.

sscheidegger

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.



Milbo

Ahhsooo
it is working correctly for the BE, but not FE. Hmm.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alatak

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";


jurabaz

#11
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.

sscheidegger

It seems that all the three problems have been resolved in VM 2.0.26.

Thanks a lot!