Author Topic: [solved] bug in product edit from frontend  (Read 6356 times)

jurabaz

  • Beginner
  • *
  • Posts: 4
[solved] bug in product edit from frontend
« 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 "../"

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9825
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: bug in product edit from frontend
« Reply #1 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jurabaz

  • Beginner
  • *
  • Posts: 4
Re: bug in product edit from frontend
« Reply #2 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?

sscheidegger

  • Jr. Member
  • **
  • Posts: 88
Re: bug in product edit from frontend
« Reply #3 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

Code: [Select]
vmError: COM_VIRTUEMART_MISSING_FLAG
or

Code: [Select]
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?

Roman_Magick

  • Beginner
  • *
  • Posts: 12
Re: bug in product edit from frontend
« Reply #4 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)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9825
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: bug in product edit from frontend
« Reply #5 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jurabaz

  • Beginner
  • *
  • Posts: 4
[solved] bug in product edit from frontend
« Reply #6 on: December 09, 2013, 10:14:11 am »
When I change ".." to "." near line 271 of \administrator\components\com_virtuemart\helpers\vmview.php
Code: [Select]
$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

  • Jr. Member
  • **
  • Posts: 88
Re: bug in product edit from frontend
« Reply #7 on: December 10, 2013, 11:24:43 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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9825
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [solved] bug in product edit from frontend
« Reply #8 on: December 10, 2013, 18:09:44 pm »
Ahhsooo
it is working correctly for the BE, but not FE. Hmm.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9825
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: [solved] bug in product edit from frontend
« Reply #10 on: December 10, 2013, 19:54:52 pm »
Hello
Code: [Select]
$image_flag="../media/mod_languages/images/".$img.".gif";I have added a absolute path instead
Code: [Select]
$image_flag=JPATH_SITE." /media/mod_languages/images/".$img.".gif";

jurabaz

  • Beginner
  • *
  • Posts: 4
Re: bug in product edit from frontend
« Reply #11 on: December 12, 2013, 20:13:35 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

  • Jr. Member
  • **
  • Posts: 88
Re: [solved] bug in product edit from frontend
« Reply #12 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!