VirtueMart 3.2.2 - Images Products - File published doesn't work - JS Conflict

Started by alyatek, June 02, 2017, 11:35:44 AM

Previous topic - Next topic

alyatek

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.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alyatek



alyatek

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!

alyatek

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