News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Error When trying to create another Custom Feild Or Clone.

Started by hotrod, May 09, 2022, 21:05:19 PM

Previous topic - Next topic

hotrod

  First time using V 4   I have 3 other sites with the 3.. never had this issue.  I was able to create One..  Then I get this error

Clone...

vmError: vmTable store insertObject #__virtuemart_customs Duplicate entry 'S-0-1' for key 'field_type_searchable_published' INSERT INTO `wf60h_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`,`modified_on`,`modified_by`) VALUES ('0','0','1','0','0','0','Choose Color Copy','','','','addEmpty=\"0\"|selectType=\"0\"|multiplyPrice=\"0\"|transform=\"\"|product_sku=\"\"|product_gtin=\"\"|product_mpn=\"\"|','S','0','1','0','','1','0','addtocart','1','0','1','2022-05-09 18:54:44','945','2022-05-09 00:50:03','945')

Create

vmError: vmTable store insertObject #__virtuemart_customs Duplicate entry 'S-0-1' for key 'field_type_searchable_published' INSERT INTO `wf60h_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','Glide Plate','','','','addEmpty=0|selectType=0|multiplyPrice=0|transform=\"\"|product_sku=\"\"|product_gtin=\"\"|product_mpn=\"\"|','S','0','0','0','','0','0','addtocart','1','0','1','2022-05-09 19:07:22','945')

VM 4
Joomla! 3.10.8
PHP  PHP 7.4.28
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

Milbo

I think that is fixed in 4.0.2 or in the next version.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sony

Hello I heve the same problem.
VirtueMart 4.0.6 10690 and Joomla! 3.10.10
It is possible to add only one for example string type. When I try to add next one there is this error message:
Error
vmError: vmTable store insertObject #__virtuemart_customs Duplicate entry 'S-0-1' for key 'field_type_searchable_published' INSERT INTO `fq54a_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`,`modified_on`,`modified_by`) VALUES ('0','3','1','0','0','0','test Copy','','','','addEmpty=\"0\"|selectType=\"0\"|multiplyPrice=\"0\"|transform=\"\"|product_sku=\"\"|product_gtin=\"\"|product_mpn=\"\"|','S','1','0','0','','0','0','','1','0','1','2022-08-09 17:03:24','840','2022-08-09 17:03:16','840')

Please can you help me?

T.A. Garrison, LLC

#3
I can say that it "may" have been fixed, but it's broken again.

I have 2 instances of Joomla 4.2.8 and Virtuemart 4.0.12 - one for development and 1 for testing.
The "testing" site works perfectly.
But the development site has been throwing that error for the last several hours and I cannot figure out the problem.

I did find, in the database, that the id for the parent custom fields group was set a 0. I changed it to the correct parent id, but that made no difference.

What VM is responding with is that it's a duplicate entry for S (string) 1 (list) and 1 (searchable).
If I do NOT select searchable, then everything is fine. But that's not the purpose of that custom field. Unless it can be searched it's of no value and I have to go back to the drawing board to figure out how to come up with a new plan.

The more I attempt to fix it the worse it gets. It was only throwing the error when I had selected searchable. Now it's throwing the error if it's not searchable and not a list.


I did some more digging and found "part" of the problem.
In the table - _virtuemart_product_customfields - for the test site, when I view the "Structure", everything looks fine.

Guess what's in that same table for the "Structure" of the development site?

....nothing....

I know that VM is not sending the data to the database, but I don't know why.



UPDATE:
I can confirm that the database is misconfigured for the _virtuemart_customs
First, the collation assigned is utf8mb4_general_ci and should be utf8mb4_unicode_ci
I've compared to 2 other databases with the same version of J4 and VM 4

The Index is also wrong.
field_type_searchable_published   BTREE   Yes should be No
There is no way to change that without dropping that and creating a new.

The only way I can see that 2 out of 3 installations for the exact same versions of J4 and VM 4 is - the working sites that have no issues had the demo products installed.
The site with the problems "did not" have the demo products installed.
Clearly, when the demo products are installed, since they use custom fields extensively, set up the database correctly.
If the demo products are not used, then the database is NOT set up properly.

I'm guessing that the demo products and the latest VM were not written by the same person / people.

I still have no answer about how to fix this. I tried a reinstall of VM, but that did nothing.
I tried to use "Tools" and reset the database without dropping the entire database.
My last ditch effort will be to drop all the tables with "Tools" then reinstall the demo products. I'm betting that will resolve the issue - installing the demo products.
I have an extensive list of categories in that site, so I won't be able to drop or remove anything until I can get that list of categories out so that it does not have to be recreated.


Second Update:
I don't see any response to this...yet...so I've moved the project to one of the sites where VM is working perfectly and updated that site with my CSS and images. In J4, that's all you need.

I am keeping the problematic VM "as-is" until I hear something. So Milbo, or whomever, if you want access or to have me send you something, please let me know.
T.A. Garrison, LLC
3150 Orleans St. # 28261
Bellingham, WA 98228

davidex2

I have the same problem. I cannot create multiple equal product variants.

Joomla 4.2.8
VirtueMart 4.0.12 10777