You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#116597 An Error when checking out in Virtuemart

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by TAGLLC on Wednesday, 24 April 2024 18:00 BST

TAGLLC

Hi - sorry to bother you again.

Today, after working with Max Milbo of Virtuemart to fix some things this last week, I was testing the system today and got an error when trying to check out.

I've already chatted with Max today about this and neither of us can figure out why the Virtuemart shopping cart has "anything" to do with JCE.

Here is the error - Too few arguments to function Joomla\Plugin\Editors\Jce\Extension\Jce::onDisplay(), 3 passed in /base/account/store.schoolfortheblonde.com/libraries/src/Plugin/CMSPlugin.php on line 289 and at least 6 expected 

I don't seem to have any issued anywhere else. So Max and I are stumped...hoping you can shed some light. And Max stated that if you have a suggestion on how he can better code something he'd be happy to hear from you - or me from you.

Thanks.

Thomas

Ryan

Here is the error - Too few arguments to function Joomla\Plugin\Editors\Jce\Extension\Jce::onDisplay(), 3 passed in /home/schoolfo/store.schoolfortheblonde.com/libraries/src/Plugin/CMSPlugin.php on line 289 and at least 6 expected

It would help to have the stack trace of this error so we can see where it is coming from. You can get this by enabling Debug System in the Joomla Global Configuration.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

TAGLLC
Call Stack
#FunctionLocation



1
()
JROOT/plugins/editors/jce/src/PluginTraits/DisplayTrait.php:105


2
Joomla\Plugin\Editors\Jce\Extension\Jce->onDisplay()
JROOT/libraries/src/Plugin/CMSPlugin.php:289


3
Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()
JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454


4
Joomla\Event\Dispatcher->dispatch()
JROOT/libraries/src/Application/EventAware.php:111


5
Joomla\CMS\Application\WebApplication->triggerEvent()
JROOT/administrator/components/com_virtuemart/helpers/vdispatcher.php:41


6
vDispatcher::trigger()
JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:1257


7
shopFunctionsF::renderCaptcha()
JROOT/components/com_virtuemart/views/user/view.html.php:252


8
VirtuemartViewUser->display()
JROOT/components/com_virtuemart/controllers/user.php:104


9
VirtueMartControllerUser->editAddressCart()
JROOT/libraries/src/MVC/Controller/BaseController.php:730


10
Joomla\CMS\MVC\Controller\BaseController->execute()
JROOT/components/com_virtuemart/virtuemart.php:133


11
require_once()
JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71


12
Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73


13
Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
JROOT/libraries/src/Component/ComponentHelper.php:361


14
Joomla\CMS\Component\ComponentHelper::renderComponent()
JROOT/libraries/src/Application/SiteApplication.php:218


15
Joomla\CMS\Application\SiteApplication->dispatch()
JROOT/libraries/src/Application/SiteApplication.php:261


16
Joomla\CMS\Application\SiteApplication->doExecute()
JROOT/libraries/src/Application/CMSApplication.php:306


17
Joomla\CMS\Application\CMSApplication->execute()
JROOT/includes/app.php:58


18
require_once()
JROOT/index.php:32


TAGLLC

To be fair, I was not logged in when I hit the "Check Out Now" button, and I did not check the mandatory "Terms" box.

My reasoning was so that I could check everything to see that the "correct" errors appear. As it turns out, there is reason I can imagine that JCE would throw errors in the VM cart. I expected VM to throw them.
The first error I expected would have been reminding the user they have not logged in or at least entered their shipping information. And, there was no error message about not having checked the box for "Terms". The only error is the one from JCE. So Max and I are confused...

If you wish, you can test yourself here - https://store.schoolfortheblonde.com/shop - the site is not live yet. I get the error after adding something to the cart and doing nothing more than hitting the "Check Out Now" button.
Even if empty the cart and see "Continue Shopping", I can hit the "Check Out Now" and get the same error. However, that's not the error expected.

Ryan

Is an editor being loaded somewhere else on the page?

Given the type of error, I would assume that this would also happen with the Tinymce or CodeMirror editor options.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

TAGLLC

Let me try messing with the others and see what happens.

When CodeMirror is enabled, here is the error:
Too few arguments to function Joomla\Plugin\Editors\Jce\Extension\Jce::onDisplay(), 3 passed in /base/account/store.schoolfortheblonde.com/libraries/src/Plugin/CMSPlugin.php on line 289 and at least 6 expected

That was after refreshing a couple of times before hitting the cart.

Here is what I got after switching to TinyMCE:
Too few arguments to function Joomla\Plugin\Editors\Jce\Extension\Jce::onDisplay(), 3 passed in /base/account/store.schoolfortheblonde.com/libraries/src/Plugin/CMSPlugin.php on line 289 and at least 6 expected

So it would seem it makes no difference which editor is enabled. Only JCE throw the error.

I decided to treat the cart as if I were actually a user. I logged in.

I still don't know why the error is thrown, but it would seem things function normally when the user is logged in. When I logged in as Admin, everything went fine.
It also functioned correctly when I was logged in using a "Registered" account.

But the error, although a moot point once logged in, that doesn't help users who will not be logged in before hitting that buy now button.
So it's still something that's pushing me further down a rabbit hole.

Ryan

I'm not setting this error in my own tests with Virtuemart using the sample data, viewing the cart after adding a product to it in the front-end, as a guest user.

Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

TAGLLC

After some testing, you are correct. The original error happens with "any" editor installed.

JCE, for whatever reason, is singled out when it's used in the site. If another is used, a generic error, or an error stating there is "no" editor installed will appear.

At this point we were leaning towards the fact that this is a VM issue for Max to resolve. And, from what I saw this morning in my conversation with Max via Skype, he's already working on a fix...if he can find the problem.

Ryan

This is definately a Virtuemart issue and has nothing to do with JCE.

On your test site, I get this error:

Too few arguments to function Joomla\Plugin\Editors\None\Extension\None::onDisplay()

which in this case refers to the "No Editor" option, so not JCE at all.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

TAGLLC

I see you got the same error I did. And that's why I thought it would be good for you to log in to a site that does not have JCE.

I also forwarded my findings to Max...and haven't heard from him since. I'm guessing he's pulling out his hair right now. When he gets the time I'm sure he'll have it fixed.

Thank you for your input. I'll close this ticket and leave you to get some actual work done now.