News:

Support the VirtueMart project and become a member

Main Menu

Recent posts

#21
Virtuemart Development and bug reports / Re: Checkout stuck issue
Last post by Voronn - April 24, 2026, 14:27:23 PM
Hello VirtueMart Team,
I would like to report a critical issue in the PayPal Checkout plugin (version 4.6.4).
Problem description:
When third-party cookies are blocked in the browser, the file site.js generates a massive number of repeated network requests (hundreds within seconds). This leads to severe performance degradation, high CPU usage, and browser slowdown.
Technical cause:
Inside Virtuemart.onReadyPP, there is a setInterval loop running every 100ms. While the PayPal SDK is not available (typeof paypal === "undefined"), the code repeatedly calls:

fetch(vmPP.nvpUrl)

This results in continuous network requests until the timeout is reached (up to 60 seconds). If the SDK cannot load (e.g., due to blocked third-party cookies), this becomes an uncontrolled request loop.

Impact:

Hundreds/thousands of unnecessary requests
High CPU usage
Browser slowdown and fan activity
Poor user experience, especially on checkout pages

Temporary fix applied:
I removed the call to fetchButtonSDK() from inside the interval loop. After this change, the issue disappears completely, and the checkout works normally.

Suggested fix:

Do not perform network requests inside a high-frequency interval
Retry logic (if needed) should be limited and not run continuously
Handle the case where PayPal SDK fails to load (e.g., due to browser privacy settings) gracefully

Environment:

VirtueMart: 4.6.4
PayPal Checkout plugin: 4.6.4
Browser: Firefox (issue reproducible with third-party cookies blocked)
Please review this behavior, as it can significantly affect site performance and user experience.

I changed last:
Virtuemart.onReadyPP = function () {

    if (vmPP.debug == '1') {
        console.log("with vmPPStyle, vmPP", vmPPStyle, vmPP);
    }

    if (
        vmPP.products.indexOf('buttons') >= 0 ||
        vmPP.products.indexOf('hosted-fields') >= 0 ||
        vmPP.products.indexOf('pui') >= 0
    ) {

        var paypalCheckAttempts = 0;
        var paypalMaxAttempts = 300; // 30 seconds

        killme = setInterval(function () {

            paypalCheckAttempts++;

            if (typeof paypal === "undefined") {

                if (vmPP.debug == '1') {
                    console.log("PayPal SDK not loaded yet");
                }

                if (paypalCheckAttempts >= paypalMaxAttempts) {
                    clearInterval(killme);
                    clearTimeout(finalPunisher);
                    console.log("PayPal SDK not loaded, stopped checking");
                }

                return;
            }

            clearInterval(killme);
            clearTimeout(finalPunisher);

            if (vmPP.debug == '1') {
                console.log("Paypal loaded");
            }

            if (vmPP.vmPPOrderId == "" && vmPP.products.indexOf('buttons') >= 0) {

                if (vmPP.debug == '1') {
                    console.log("Paypal buttons loaded");
                }

                if (vmPP.withButton == "true") {
                    Virtuemart.renderPayPalButtons("#paypal-button-container");
                }

                if (vmPP.withLogin == "true") {
                    Virtuemart.renderPayPalButtons("#paypal-button-login");
                }
            }

            if (
                vmPP.products.indexOf('hosted-fields') >= 0 &&
                vmPP.selected == 'hosted-fields'
            ) {
                if (vmPP.debug == '1') {
                    console.log("Paypal hosted-fields loaded");
                }

                jQuery('.card_container').hide();
                Virtuemart.renderPayPalCredit();
            }

            if (vmPP.products.indexOf('pui') >= 0) {
                if (vmPP.debug == '1') {
                    console.log("Paypal PUI loaded");
                }

                Virtuemart.renderPUI();
            }

        }, 100);

        finalPunisher = setTimeout(function () {
            clearInterval(killme);
            console.log("Loading Buttons killed");
        }, 30000);
    }
};

});

Best regards
#22
General Questions / Re: create a menu link to regi...
Last post by Graziano - April 23, 2026, 10:00:14 AM
I've similar problem but in register form (joomla form) not show username field, and I can't register new user
#23
No, you shouldn't :) It must be a VM bug, I just confirmed
#24
Yes of course. But this makes  no sense. Why should I all of a sudden create my own VM asset folder in the root directory after 16 years using VM?
#25
Same here.

On 4.6.8 the image path is img src="/assets/images/vmgeneral/noimage.gif", while on 4.6.6 it was "/components/com_virtuemart/assets/images/vmgeneral/noimage.gif".
#26
The settings in the VM configuration "Use jQuery chosen for dropdowns in FE" take no effect. The dropdowns always use Choices js even when the settings are "None".
I am aware that this VM version is not made for Joomla 6, I tried it just to see what happens. Most of the functions work fine.
Version 4.9.3 can't be installed. I always get an internal server error. That's why I tried versionb 4.6.8.
#27
The link to noimage.gif is broken because the link to the assets folder is wrong. In BE in the VM configuration I get the following message:

vmError: File not found /www.mydomaine.com/assets/images/vmgeneral/noimage.gif

The path to the component (com_virtuemart/) is missing.

J 5.4.5
VM 4.6.8.11258
#28
Installation, Migration & Upgrade / Error after VM update
Last post by ViPeS - April 21, 2026, 11:28:40 AM
vmError: FAILED: alterKey ADD INDEX category_child_id: Duplicate entry '174' for key 'category_child_id' ALTER TABLE `tyfz5_virtuemart_category_categories` ADD UNIQUE KEY `category_child_id` (`category_child_id`)
after VM update to 4.6.8.11258

What should be done to fix this error?
#29
Your Live Sites / Bookstore e-redstar.net
Last post by artonweb - April 19, 2026, 14:17:52 PM
The website e-redstar.net is a niche digital e-commerce platform focused on selling PDF-based aviation and defense publications.
It is run by an independent team of authors and engineers producing highly specialized illustrated studies.
The website has unique positioning appeals to:

aviation enthusiasts
engineers
model makers
defense analysts

E redstar has:

* Unique, high-quality niche content
* Expert-driven publications
* Simple and focused eCommerce model
* Clear identity and mission
#30
Hi I've an error link when to generate category or item >>> see pics
VM 4.6.4
Joomla 5.4.5
PHP 8.4
Site >>> https://magentashop.altervista.org/
see attachment
     0 in_array(): Argument #2 ($haystack) must be of type array, null given

Call Stack
#    Function    Location
1    ()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:421
2    in_array()    JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:421
3    shopFunctionsF::renderVendorAddress()    JROOT/components/com_virtuemart/views/vendor/tmpl/bs5-details.php:48
4    include()    JROOT/libraries/src/MVC/View/HtmlView.php:416
5    Joomla\CMS\MVC\View\HtmlView->loadTemplate()    JROOT/components/com_virtuemart/helpers/vmview.php:113
6    VmView->display()    JROOT/components/com_virtuemart/views/vendor/view.html.php:140
7    VirtuemartViewVendor->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:697
8    Joomla\CMS\MVC\Controller\BaseController->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:730
9    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/components/com_virtuemart/virtuemart.php:135
10    require_once()    JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
11    Joomla\CMS\Dispatcher\LegacyComponentDispatcher::{closure:Joomla\CMS\Dispatcher\LegacyComponentDispatcher::dispatch():70}()    JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
12    Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()    JROOT/libraries/src/Component/ComponentHelper.php:361
13    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/SiteApplication.php:217
14    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:271
15    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:304
16    Joomla\CMS\Application\CMSApplication->execute()    JROOT/includes/app.php:58
17    require_once()    JROOT/index.php:51
--------------------------------------
The problem only occurs with the category sorting and generation
Probably syntax error with PHP 8.4, waiting for advice on how to proceed, I'm a beginner on PHP8 code thanks to anyone who answers