Problem with creating a new vendor and clone customfields[Vm 4]

Started by hazael, May 04, 2022, 14:00:04 PM

Previous topic - Next topic

hazael

I installed a clean stable version of VM4. There was an immediate problem in editing the store (filling in the seller's details and the store's currency).

vmError: Registration failed: The object must be an array or an object that implements ArrayAccess
vmError: Save failed with the following error: The object must be an array or an object that implements ArrayAccess


I have tried multiple times to fill in all the fields for each tab. Unsuccessfully...


Another problem is the inability to clone custom fields.
Generally, I can add up to 2 custom fields. I get an error when I add any custom field number 3.


"vmError: vmTable store insertObject #__virtuemart_customs Duplicate entry 'S-0-1' for key 'field_type_searchable_published' INSERT INTO `szereg_virtuemart_customs` (`virtuemart_custom_id`,`custom_parent_id`,`virtuemart_vendor_id`,`admin_only`,`custom_jplugin_id`,`custom_element`,`custom_title`,`custom_tip`,`custom_value`,`custom_desc`,`custom_params`,`field_type`,`is_list`,`is_input`,`is_hidden`,`virtuemart_shoppergroup_id`,`is_cart_attribute`,`searchable`,`layout_pos`,`published`,`ordering`,`show_title`,`created_on`,`created_by`) VALUES ('0','0','1','0','0','0','test Copy','','','','addEmpty=0|selectType=0|multiplyPrice=0|transform=\"\"|product_sku=\"\"|product_gtin=\"\"|product_mpn=\"\"|','S','0','0','0','','0','0','','1','0','1','2022-05-04 13:44:30','870')"

VirtueMart 4.0.0 10645
Joomla 4.1.2
PHP: 8.0.18
PHP 7.4.29

hazael

I think I found the answer to my problem. on the server in PHP settings I had the "parse_ini_file" function turned off

hazael

My problem came up again - exactly the same. Once I removed the custom fields and started adding again.
When I try to add a custom field "string" the database gives me an error:

"Repeated occurrence of 'S-0-1' for key 'field_type_searchable_published'"

INSERT INTO `szeregi_virtuemart_customs` (`virtuemart_custom_id`, `custom_parent_id`, `virtuemart_vendor_id`, `custom_jplugin_id`, `custom_element`, `admin_only`, `custom_title`, `show_title`, `custom_tip`, `custom_value`, `custom_desc`, `field_type`, `is_list`, `is_hidden`, `is_cart_attribute`, `is_input`, `searchable`, `layout_pos`, `custom_params`, `virtuemart_shoppergroup_id`, `shared`, `published`, `created_on`, `created_by`, `ordering`, `modified_on`, `modified_by`, `locked_on`, `locked_by`) VALUES (NULL, '0', '1', '0', '0', '0', 'Rodzaj zabudowy', '1', '', '', '', 'S', '0', '0', '0', '0', '0', '', 'addEmpty=0|selectType=0|multiplyPrice=0|transform=\"\"|product_sku=\"\"|product_gtin=\"\"|product_mpn=\"\"|', '', '0', '1', '2022-05-10 09:19:15', '218', '0', NULL, '0', NULL, '0')

If I change "field_type: S" to a different letter, the field is saved in the database.

pinochico

php8?
I don't think so if really function....
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hazael

I tested on php7 and php8 - it works similar.
Database: MariaDB 10.1.48

I have VM4 installed on the latest Joomla 3 and 4. Both versions are also reporting this error to me.

pinochico

ok,
I don't try VM4 version not yet, because now we upgrade for J4 others extensions and waiting for info from JED
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

hotrod

 I have the same Issue...   Guess I'll be stepping back to VM 3 and starting over..
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

hazael

It's strange ... After an hour the problem disappears by itself ... After a while it reappears. As if some old references are being kept in the server's memory. :-/

Jörgen

Turn off cache, Joomla plugins, server cache etc
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

hazael

This is some weird problem that has never been seen on the same server in previous versions before.
This error keeps showing up even when I try to add a similar record in the phpMyAdmin console.
I pasted a copy of the database tables (#_virtuemart_customs ) from the older VM version, I added missing line "virtuemart_shoppergroup_id" and the problem is gone.

The only difference in these tables is the "Subtitle Comparison Method". Was utf8_general_ci and it is utf8mb4_unicode_ci





Studio 42

"Repeated occurrence of 'S-0-1' for key 'field_type_searchable_published'"
I think  this is something about a table KEY ?

balai

It is a wrong key
UNIQUE KEY field_type_searchable_published  (`field_type`, `searchable`, `published`),

Obviously this key cannot be unique since the mentioned fields combination can be repeated several times.

Jumbo!

It can be a regular key which can be used for indexation. But it can not be a unique key.

Milbo

ehrm, and no one tells me. Luckily I found it, replaced the UNIQUE against KEY
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/