VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: rjcroasdale on April 30, 2020, 20:34:37 PM

Title: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on April 30, 2020, 20:34:37 PM
Hello all,  any views on this please, I'm not a Javascript/Jquery expert.

It seems to me that when I select new, under payment methods, the resulting config page does not load Jquery before jquery.cookie resulting in "jQuery.cookie is not a function" when trying to save.

On the payment methods page, index.php?option=com_virtuemart&view=paymentmethod, jquery is loaded first and interaction works fine.

A previously configured payment gateway config page also works and loads jquery before jquery.cookie and save works fine.

It seems then the first save, before the configuration tab will appear, does not load jquery before jquery.cookie and so cannot save the payment method to get the config tab.

Does this sound plausible to you guys? Or do you know of the problem/solution?

Thank you
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: AH on May 01, 2020, 10:00:22 AM
What payment plugin are you trying to use

That will probably be the clue
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on May 05, 2020, 06:55:18 AM
Quote from: AH on May 01, 2020, 10:00:22 AM
What payment plugin are you trying to use

That will probably be the clue

Hi thanks for the reply.

I'm not sure that makes a difference as this is before any selected payment method is posted.

Shop > Payment Methods >> New

The only difference I noticed between pages where buttons work and this page is the load order of jquery and jquery cookie.
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: Jörgen on May 05, 2020, 08:14:37 AM
Unpublish all of the Payment plugins until you find the culprit.

Have You updated the VM AIO ?

Jörgen @ Kreativ Fotografi
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: GJC Web Design on May 05, 2020, 09:47:08 AM
QuoteIt seems then the first save, before the configuration tab will appear, does not load jquery before jquery.cookie and so cannot save the payment method to get the config tab.

imho the configuration tab isn't supposed to appear because it cant until you have chosen and SAVED a method type
the config tab is rendered BY the method
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on May 08, 2020, 10:29:29 AM
Quote from: GJC Web Design on May 05, 2020, 09:47:08 AM
QuoteIt seems then the first save, before the configuration tab will appear, does not load jquery before jquery.cookie and so cannot save the payment method to get the config tab.

imho the configuration tab isn't supposed to appear because it cant until you have chosen and SAVED a method type
the config tab is rendered BY the method

Yes thats right, I think you somewhat misunderstood the issue.
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on May 08, 2020, 10:32:38 AM
I did not resolve my issue or understand why this was happening as I just went and added directly in the db to circumvent the issue for now.
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: Jörgen on May 08, 2020, 10:47:35 AM
A faulty published but not used payment method can break exactly what You are reporting. If unpublishing all the unused payment methods helps. Then You know that one of them is faulty. If You still having trouble, it could very well be the method You are using that isn´t up to date or badly written.

Jörgen @ Kreativ Fotografi
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on May 08, 2020, 10:59:15 AM
Quote from: Jörgen on May 05, 2020, 08:14:37 AM
Unpublish all of the Payment plugins until you find the culprit.

Have You updated the VM AIO ?

Jörgen @ Kreativ Fotografi


Thank you for the suggestions, I will give them a go.
Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: AH on May 08, 2020, 11:02:16 AM
QuoteWhat payment plugin are you trying to use

That will probably be the clue

You dont know what is wrong and yet you still think you know enough not to bother giving the this answer??

Title: Re: New Payment Method Save / JQuery.cookie is not a function / JQuery load order
Post by: rjcroasdale on May 08, 2020, 11:06:30 AM
Quote from: Jörgen on May 08, 2020, 10:47:35 AM
A faulty published but not used payment method can break exactly what You are reporting.

You posted this as I was making my reply to you :) Thank you I will try these.