VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: stawebnice on February 26, 2026, 19:23:58 PM

Title: Undefined constant "VMPATH_ADMINISTRATOR" after update to 4.6.0
Post by: stawebnice on February 26, 2026, 19:23:58 PM
Hi Max,

please could you help me?

I'm trying to update VM on Joomla 4.4.10 (PHP 8.1) to 4.6.0 (tried the same with 4.6.2 and 4.6.4) but when I do it, I get this error:

Undefined constant "VMPATH_ADMINISTRATOR" and the whole admin of Joomla is blocked by this,


I can't get anywhere, even to install it again (which is what shows as recommendation when I install it firt)

Do you have any tip how to fix this?

Thank you!

Peta
Title: Re: Undefined constant "VMPATH_ADMINISTRATOR" after update to 4.6.0
Post by: stawebnice on February 26, 2026, 19:31:50 PM
I renamed the vm folders in administrator and tried installing 4.6.4 to replicate the errors again and I got this

vmError: FAILED: alterKey ADD INDEX category_child_id: Duplicate entry '319' for key 'category_child_id' ALTER TABLE `ei5qk_virtuemart_category_categories` ADD UNIQUE KEY `category_child_id` (`category_child_id`)

rest of the messages:

Deleted old column locked_on from #__virtuemart_order_calc_rules
Deleted old column locked_by from #__virtuemart_order_calc_rules
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calcs.calc_kind_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_categories.opc_virtuemart_category_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_manufacturers.opc_virtuemart_manufacturer_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_shoppergroups.opc_virtuemart_shoppergroup_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_countries.opc_virtuemart_country_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_states.opc_virtuemart_state_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_categories.virtuemart_category_id_uindex
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_categories.category_parent_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_category_categories.category_child_id_uindex
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_category_categories.category_parent_id_index
alterColumns ei5qk_virtuemart_customs from TEXT NOT NULL to custom_params TEXT AFTER `layout_pos`
alterTable CHANGE ei5qk_virtuemart_customs.custom_params query ALTER TABLE `ei5qk_virtuemart_customs` CHANGE COLUMN `custom_params` `custom_params` TEXT AFTER `layout_pos`
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_customs.virtuemart_custom_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_orders.order_number_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_orders.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_histories.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_histories.created_on_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_items.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_calc_rules.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_gtin_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.published_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.virtuemart_vendor_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_mpn_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_sales_index
IGNORE: alterColumns ei5qk_virtuemart_product_customfields from MEDIUMTEXT to customfield_params TEXT COMMENT 'PARAM FOR PLUGINS'
alterTable DROP INDEX ei5qk_virtuemart_product_customfields.unique_custf_prd_value
alterTable DROP INDEX ei5qk_virtuemart_product_customfields.unique_cust_prd_value
alterKey ADD INDEX unique_custf_prd_value
alterKey ADD INDEX unique_cust_prd_value
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_manufacturers.virtuemart_manufacturer_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.product_override_price_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.product_price_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.virtuemart_shoppergroup_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.virtuemart_product_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_rating_votes.virtuemart_rating_vote_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_shoppergroups.virtuemart_vendor_id_index
IGNORE: alterColumns ei5qk_virtuemart_vendors_cs_cz from MEDIUMTEXT to vendor_letter_header_html VARCHAR(6500) NOT NULL DEFAULT '
{VM:VENDORNAME}

{VM:VENDORADDRESS}
'
IGNORE: alterColumns ei5qk_virtuemart_vendors_cs_cz from MEDIUMTEXT to vendor_letter_footer_html VARCHAR(6500) NOT NULL DEFAULT '

{VM:VENDORLEGALINFO}
PAGE {VM:PAGENUM}/{VM:PAGECOUNT}
'
All countries are up to date
98 souborů, pro které máte ve své šabloně přepsání, byly aktualizováno a měli byste tyto změny zkontrolovat.
danger
vmError: FAILED: alterKey ADD INDEX category_child_id: Duplicate entry '319' for key 'category_child_id' ALTER TABLE `ei5qk_virtuemart_category_categories` ADD UNIQUE KEY `category_child_id` (`category_child_id`)
info
Table updated: Tablename ei5qk_virtuemart_customs dropped: 0 altered: 1 added: 0
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_standard
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_paypal_checkout
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_paypal
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_shipment_plg_weight_countries
success
Instalace balíčku byla úspěšná.
Title: Re: Undefined constant "VMPATH_ADMINISTRATOR" after update to 4.6.0
Post by: stawebnice on February 26, 2026, 19:37:05 PM
(https://www.baes.cz/images/sampledata/319.jpg)

This is what I see when I try to resave the category 319 in the live VM
but when I check in db, I only see one category with id 319 in the table
Title: Re: Undefined constant "VMPATH_ADMINISTRATOR" after update to 4.6.0
Post by: stawebnice on February 26, 2026, 19:47:25 PM
so I looked up 319 in table xx_virtuemart_category_categories and removed the 1st line

(https://www.baes.cz/images/sampledata/319a.jpg)

then again renamed the vm folder in administrator and tried to install 4.6.6, this red error is gone but still the same error even though it says that the istallation was successful

Instalace: Nelze najít soubor XML nastavení (can't find xml settings file)
info
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calcs.calc_kind_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_categories.opc_virtuemart_category_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_manufacturers.opc_virtuemart_manufacturer_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_shoppergroups.opc_virtuemart_shoppergroup_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_countries.opc_virtuemart_country_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_calc_states.opc_virtuemart_state_id
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_categories.virtuemart_category_id_uindex
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_categories.category_parent_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_category_categories.category_child_id_uindex
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_category_categories.category_parent_id_index
alterKey ADD INDEX category_child_id
alterColumns ei5qk_virtuemart_customs from TEXT NOT NULL to custom_params TEXT AFTER `layout_pos`
alterTable CHANGE ei5qk_virtuemart_customs.custom_params query ALTER TABLE `ei5qk_virtuemart_customs` CHANGE COLUMN `custom_params` `custom_params` TEXT AFTER `layout_pos`
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_customs.virtuemart_custom_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_orders.order_number_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_orders.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_histories.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_histories.created_on_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_items.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_order_calc_rules.virtuemart_order_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_gtin_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.published_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.virtuemart_vendor_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_mpn_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_products.product_sales_index
IGNORE: alterColumns ei5qk_virtuemart_product_customfields from MEDIUMTEXT to customfield_params TEXT COMMENT 'PARAM FOR PLUGINS'
alterTable DROP INDEX ei5qk_virtuemart_product_customfields.unique_custf_prd_value
alterTable DROP INDEX ei5qk_virtuemart_product_customfields.unique_cust_prd_value
alterKey ADD INDEX unique_custf_prd_value
alterKey ADD INDEX unique_cust_prd_value
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_manufacturers.virtuemart_manufacturer_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.product_override_price_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.product_price_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.virtuemart_shoppergroup_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_product_prices.virtuemart_product_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_rating_votes.virtuemart_rating_vote_id_index
IGNORE: alterTable DROP INDEX ei5qk_virtuemart_shoppergroups.virtuemart_vendor_id_index
IGNORE: alterColumns ei5qk_virtuemart_vendors_cs_cz from MEDIUMTEXT to vendor_letter_header_html VARCHAR(6500) NOT NULL DEFAULT '
{VM:VENDORNAME}

{VM:VENDORADDRESS}
'
IGNORE: alterColumns ei5qk_virtuemart_vendors_cs_cz from MEDIUMTEXT to vendor_letter_footer_html VARCHAR(6500) NOT NULL DEFAULT '

{VM:VENDORLEGALINFO}
PAGE {VM:PAGENUM}/{VM:PAGECOUNT}
'
All countries are up to date
90 souborů, pro které máte ve své šabloně přepsání, byly aktualizováno a měli byste tyto změny zkontrolovat.
info
Table updated: Tablename ei5qk_virtuemart_customs dropped: 0 altered: 1 added: 0
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_standard
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_paypal_checkout
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_payment_plg_paypal
com_virtuemart_allinoneInstallerScript:: VirtueMart update #__virtuemart_shipment_plg_weight_countries
success
Instalace balíčku byla úspěšná. (package installation was successful)
Došlo k chybě. (an error occured)

    0 Undefined constant "VMPATH_ADMINISTRATOR"