News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Problem with Save and Save and Close buttons not working after upgrade

Started by JeremyD, February 26, 2019, 15:06:58 PM

Previous topic - Next topic

JeremyD

Having problems with none of the Save and Save and close buttons working in the VM backend following a VM update from VirtueMart 3.2.14 to VirtueMart 3.4.2, and a subsequent retry to VirtueMart 3.4.3 10005

When clicked, buttons change colour, but no action takes place. Happens when trying to edit Categories, Products or Configuration, so presumably throughout VM admin.

Console shows error as:

Uncaught ReferenceError: myValidator is not defined
    at Object.Joomla.submitbutton (index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=214:1927)
    at HTMLButtonElement.onclick (index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=214:551)

Joomla version is 3.9.3
Php version 7.1.23

Admin template is Isis, and I've tried using Hathor with same result.

I'm assuming either a missing script, or a script conflict but could use a steer where to look.

Any thoughts?

Thanks

Jeremy
DVisions
Dorset, UK.
www.dvisions.co.uk

jenkinhill

Works OK for me. I wonder if there is an installation issue, so try a simple re-install of com_virtuemart.3.4.3.10005.zip   (I assume you are working on a backup of a live site and not on the live site itself...)
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

JeremyD

Already tried re-installing. I originally ran the update to 3.4.2, then when I encountered the issue, downloaded com_virtuemart.3.4.3.10005.zip and installed that over the top. Didn't make any difference.

It must be specific to this installation, as I'm sure others would be reporting the same problem if it was a common thing. But I just can't see why!

I did receive a warning during the install:

JFolder: :delete: Path is not a folder. Path: /home/[path hidden]/administrator/components/com_virtuemart_allinone/libraries
JFolder: :delete: Path is not a folder. Path: /home/[path hidden]/administrator/components/com_virtuemart_allinone/plugins
JFolder: :delete: Path is not a folder. Path: /home/[path hidden]/administrator/components/com_virtuemart_allinone/modules
JFolder: :delete: Path is not a folder. Path: /home/[path hidden]/administrator/components/com_virtuemart_allinone/modulesBE

But I don't think that's relevant - I think this is part of the post-install cleanup? And the files do all appear to be correct.

PS: And yes, definitely working on a backup! :-)
DVisions
Dorset, UK.
www.dvisions.co.uk

GJC Web Design

I have seen this before and from memory was to do with the JCE editor ( if u have it installed) - remove the js compression in the config (JCE)

otherwise esp. in Chrome have experienced this after an upgrade but hard clearing the browser cache fixed it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

JeremyD

Yeah, I've run across that issue with JCE before, but not for quite a while. But I've just checked that compression is off (it is) and doesn't seem to make any difference. And I can't see how that would be affecting the VM save buttons, even on pages where the editor isn't loaded.

I don't think it's browser caching - I normally use Opera, which is Chrome driven, but I've even tried using Edge, because I never normally do, and know there can't be anything cached in it! :-)

It seems to be something to do with a call to a validation script, which is why I mostly suspect a conflict somewhere.
DVisions
Dorset, UK.
www.dvisions.co.uk

GJC Web Design

myValidator is used in the administrator\components\com_virtuemart\helpers\vmviewadmin.php

function addJsJoomlaSubmitButton($validate=false)

         if($validate){
            vmJsApi::vmValidator();
            $form = "if( (a=='apply' || a=='save') && myValidator(form,false)){
            form.submit();
         } else if(a!='apply' && a!='save'){
            form.submit();
         }";
         } else {
            $form = "form.submit();";
         }


are u loading successfully  components/com_virtuemart/assets/js/jquery.validationEngine.js?vmver=xxxxxx ?

and components/com_virtuemart/assets/js/vmvalidator.js?vmver=xxxxxx  - used by the vmValidator function
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

JeremyD

OK. Firstly thanks for your replies, especially @GJC Web Design - you were on the right lines

I've now tracked down the issue - although the site uses the default theme, it uses a custom sprite for icons, and other images. Consequently the general assets folder had been changed in the configuration to prevent these being overwritten during an update. But the general assets folder also contains the vmvalidator.js validation script, (amongst others), new to v3.4.x. Manually copying all the new files into the right place fixed things...

Guess I should have spotted this before, but couldn't see it for looking!
DVisions
Dorset, UK.
www.dvisions.co.uk