News:

Looking for documentation? Take a look on our wiki

Main Menu

Create a new shipping method gives an error

Started by pimo, May 26, 2023, 16:59:50 PM

Previous topic - Next topic

pimo

Joomla 4.3.1 and Virtuemart 4.0.2, PHP 7.4 (If I put PHP 8 or higher I have problems editing products). When trying to create a new shipping method I get 2 errors:

vmError: vmTable store insertObject #__virtuemart_shipmentmethods Field 'slug' doesn't have a default value INSERT INTO `xz3sd_virtuemart_shipmentmethods` (`virtuemart_shipmentmethod_id`,`virtuemart_vendor_id`,`shipment_jplugin_id`,`shipment_element`,`currency_id`,`shipment_params`,`ordering`,`shared`,`published`,`created_on`,`created_by`,`locked_by`) VALUES ('0','1','10018','weight_countries','47','shipment_logos=\"\"|show_on_pdetails=\"\"|zip_start=\"\"|zip_stop=\"\"|weight_start=\"\"|weight_stop=\"\"|weight_unit=\"\"|nbproducts_start=0|nbproducts_stop=0|shipment_cost=0.0|package_fee=0.0|tax_id=\"\"|free_shipment=\"\"|categories=\"\"|blocking_categories=\"\"|countries=\"\"|blocking_countries=\"\"|min_amount=0.0|max_amount=0.0|virtuemart_shipmentmethod_ids=\"\"|byCoupon=\"\"|couponCode=\"\"|display_color=\"\"|','0','0','1','2023-05-26 13:56:48','1588','0')
vmError: vmTable store insertObject #__virtuemart_shipmentmethods_es_es Duplicate entry '0' for key 'PRIMARY' INSERT INTO `xz3sd_virtuemart_shipmentmethods_es_es` (`virtuemart_shipmentmethod_id`,`shipment_name`,`shipment_desc`,`slug`) VALUES ('0','prueb 33','','prueb-33')

Margriet

Unable to reproduce. Just created 3 new shipment methods last week. Must be something in your installation.
Try with clean Joomla install with VM and sample data and Cassiopeia template (template shouldn't do much, but just to make sure).

pimo

Good morning, everything was working fine before, at what point it started to fail I don't know. In this post it shows the same error and the solution:

https://forum.virtuemart.net/index.php?topic=148798.0

I have not tried yet, I have many doubts. But I have always updated all Virtuemart versions when the warning has come out in Joomla, so this version that is specified must have been installed.
  Since the membership was installed, no update notifications have been received for Virtuemart. I installed version 4.0.20 because I saw that it was available in a forum. So I wonder if any previous update has been skipped? In fact I have read in another psot that version 4.0.22 is available, but I don't see it.
I think the Virtuemart updates are not working as they should.

Making a new page will fix the problem, but it is not the solution. There are plenty of products, shipping methods, and other things already set up to do all that work. They should not recommend this to anyone, rather they should look for the problem and the solution.
I'm not sure what the casiopeia template has to do with the backend, I don't think that solves anything. In any case, you are using Cassiopeia in the front.

pimo

I have tried to install version 4.0.7 indicated in the post attached above, but I still have the same problem.

Jörgen

Do you have any payment or shipping plugins that you do not use?
If so unpublish the plugins in through Joomla.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pimo

Hello, several years ago I minimize the use of plugins or anything else.
There are enough problems with only Joomla and Visrtuemart to look for more.....

Margriet

QuoteI have tried to install version 4.0.7 indicated in the post attached above, but I still have the same problem.
Always use the latest version. Membership version 4.0.20 and free version 4.0.12!

pimo

Hello Margarit, if you read the first message of this post, you will see that version 4.0.20 was installed with membership.

So I don't understand this problem and others, like the one in PHP 8. I read in many posts that these things are solved, but I still have the same problems. So I'm not sure the updates are working well.

Margriet

Sorry, but in your first post you've written
QuoteVirtuemart 4.0.2,
, so how am I supposed to know that you're having version 4.0.20?
And it strikes me that you do seem to have a lot of problems with VM, which are not reproducible by anyone and/or have long been solved. The cause could also lie with your settings or your hoster.

pimo

I have read the same problems that I have in this forum. They don't just happen to me. The hosting has always been the same, for more than 14 years, its configuration has not changed and it has always worked well.
The updates are made, but the problems persist.
I've also looked at template overrides, but I don't see any that have to do with these problems.

That question that you ask yourself, I ask myself, how is it possible that the problems are fixed but I continue with them?
The PHP problem has something to do with the language files, I don't remember exactly what it was, but something that the new version of PHP didn't understand, a ? or some symbol like that. In fact, there is a language file in English to download in the membership, but the installation also gives me a problem.

So I still think there is a problem with the updates.

pimo

Good morning, not having any news about this problem makes me nervous, at least an answer if it has been seen that it is a problem in Virtuemart or if it is just my problem. I understand that many of the problems that are exposed in the forum are being fixed and I am waiting for the next update, but an answer would be nice.

I would like to check the folders for the files that have to do with shipping methods, to rule out other problems. Can someone tell me which folders they are in?

Margriet

There is something wrong with your database. Have you tried to repair your tables?
vmError: vmTable store insertObject #__virtuemart_shipmentmethods_es_es Duplicate entry '0' for key 'PRIMARY' INSERT INTO `xz3sd_virtuemart_shipmentmethods_es_es` (`virtuemart_shipmentmethod_id`,`shipment_name`,`shipment_desc`,`slug`) VALUES ('0','prueb 33','','prueb-33')
virtuemart_shipmentmethod_id can't be 0

pimo

The tables are not updated, it is another of the errors that are pending, I indicated it in the post that you have put about it.
I have seen that someone has found a solution, I don't know whether to try it or wait for the next update.

Margriet

What you want. Personally I would apply the fix.

pimo

I have tried the solution to install and update tables. That fixes the tables problem, but my problem persists in creating a new shipping method.