VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: alyatek on June 02, 2017, 11:35:44 AM

Title: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: alyatek on June 02, 2017, 11:35:44 AM
Hello everybody!

Today I upgraded to Virtuemart 3.2.2, and I found that if I try to unpublish a picture that I uploaded, the checkbox of file published doesn't work.

I think I found the problem but I can't figure out a solution.

I'll explain step by step:
1. A picture is uploaded, by default it is published, so the checkbox is checked;
2. If the checkbox is unchecked and and saved the picture gets unplished;
3. After the save the checkbox is still checked but the picture isn't published

I went to inspect element and found that there are 2 checkboxes, 1 hidden and the other one displayed, by default somehow the displayed is always check, but the hidden one as the correct value of the image publish status(Picture below).

http://i.imgur.com/YMiKKAI.png

I searched for the name of the input and found this portion of code:
$html .= VmHtml::checkbox('media[media_published]',$checked,1,0,'class="inputbox"','media[media_published]') ;

it's in administrator/compontents/com_virtuemart/helpers/mediahandler.php

If that code is commentated both of the checkboxes disapear so I'm pretty sure that is the part that I need, but the problem is that I don't really understand what that is.

Don't know if anybody ever faced this problem but if someone can help me, thank you very much

EDIT 1: Kinda figured it out the problem but not the solution.
It's probably the javascript, if I have my main picture disabled the check isn't check, if I jump to another one that isn't published the check isn't checked aswell, but if I go from the not check to a checked one and go back to the nonchecked it gets check because of probably the javascript isn't updating that box, still don't know how to figure it out.
Title: Re: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: jenkinhill on June 02, 2017, 14:40:25 PM
Suggest you try VM3.2.3
Title: Re: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: alyatek on June 02, 2017, 15:40:01 PM
Where can I aquire such version of VM?
Title: Re: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: K&K media production on June 02, 2017, 15:54:32 PM
http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: alyatek on June 02, 2017, 17:31:20 PM
Oh thanks! I looked there, but not enough, I tought they would create a new tab for the 3.2.3 but it's mixed with the 3.2.2
Thanks once again!
Title: Re: VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict
Post by: alyatek on June 02, 2017, 18:08:14 PM
Still didn't make any difference, the checkbox as the same problem, after the versions 3.x this happens. Because if I have a previous versions other than 3 or bigger, if I'm logged in and I try do edit the cart information like the billing or the address it says I don't have permissions