Hi,
after the upgrade to VirtueMart 3.8.9 Eagle owl 10514, when I insert a product, the form that opens is like a "modify product form" of a product, instead of a blank form to create a new product.
PHP 7.4.22
Mysql 5.5.5-10.3.27-MariaDB
How can I solve this problem?
Thanks in advance.
Davide
?? Screenshot would be helpful
Jörgen @ Kreativ Fotografi
Hi Jorgen,
sure, you have it in attachment, thanks.
This is what I see when I create a new product.
Regards,
Davide
Are you doing this with the new admin template ?
Switch to the old one in that case and see.
Jörgen @ Kreativ Fotografi
or some heavy caching somewhere?
Hi to everybody!
Just disabled the VM Admin Template and the problem persists.
The same for the New Admin Theme.
Cache? It's disabled...
Thanks in advance.
Davide
try a different browser to eliminate browser caching?
Hi,
just tried with different browsers and different pc/mac, but the problem persists...
Thanks.
Davide
So what your saying is when u click "New" the product edit form opens but the fields are prefilled?
Always the same product detail?
What is the url?
Does this particular product exist in your shop?
If not is it in your DB?
Under virtuemart_product_id 0 perhaps?
Hi,
I'm answering to all your questions:
1. Yes, when I click on "New product" the fields are prefilled with this product.
2. Yes.
3. This: /administrator/index.php?option=com_virtuemart&view=product
4. Yes, it exists.
5. It exists.
6. The virtuemart_product_id is 7855
Thanks.
Davide
The new Id is 7855, yes ?
But data comes from id = 0 right.
Delete product with Id =0.
Jörgen
as Jörgen says .. check if u have a product in the tables with virtuemart_poduct_id = 0 .. if so delete it
Hi,
the problem is that I haven't a product with virtuemart_product_id = 0
It starts from 4.
Thank,
Davide
QuoteI haven't a product with virtuemart_product_id = 0
in all language?
Hi pinochico,
yes, just checked ann the 3 tables:
products
products_it
products_en
Same problem in the backend in all languages.
Thanks.
Davide
You have more product related tables custom fields, prices etc. Have You checked these?
What is the highest index in Your product table ?
Jörgen
Hi,
did some tests and the situation is very strage.
I imported a new test product via ROCSVI and when I click on new, the product creation is always from the latest product inserted.
I'm very worried...
Thanks.
Davide
The sql table has an index that is autoincremented ? what is the autoincrement value ? Is it one to low ?
Jörgen
See how declaring ALL info would have helped you and stopped us wasting our time?
no where did u mention that you are importing products via a 3rd party ext.
It is fairly obvious then that the import is not correct....
Hi GJC,
I told you everything, I wrote the situation.
But this morning I had to have a solution to create some products and I decided to do this creation with the importer, nothing else.
@Jorgen
Yes, from 4 to 10240.
Thanks.
Davide
You can not create a new product with Id 7855 IF you have more than 10000 occupied indexes. You overwrite old products. Why has this happened? I Guess a wrongly applied products import or some Broken and not completed products update. Check your phpmyadmin and set a correct next autoincrement index. I already told You in my previous post to check the autoincrement indexes, have You done that ?
Good luck
Jörgen
Hi Jorgen,
I know! :)
No, I NEVER did an import before lastday... so I don't know how this problem was created.
In mysql, the next autoincrement works.
Thanks.
Davide
How can You have index 7855 Then ?
Jörgen
Hi Jorgen,
this is a beautiful question...
I'm sorry, but I don't know....
Probably an update of Virtuemart?
Thanks.
Davide
VM updates do not alter any table entries
If Your autoincrement points to one past the last of your table. I am out of guesses.
Jörgen
Hi,
In attachment you find the table structure...
Thanks,
Davide
This tells us nothing about the issue.
You have to check under Operations for this table. There you will see and can also set the actual Autoincrement value.
Jörgen @ Kreativ Fotografi
Hi,
the last ID is 10216 in the products table, so in the operation is 10217.
In attachment the screenshot.
Thanks.
Davide
OK, when Do you get product id 7855 ?
Where does this come from ?
Was it perhaps the last product You edited before you med a new product ?
Can this be some autofill that comes from Your web browser ? Browser cache issue perhaps ?
Jörgen @ Kreativ Fotografi
Hi Jorgen,
I did a copy of the website, I updated VM and the info I'm saying to you are from the copy of the website.
In the new copy, the product that always appears when I create a product is the 10216.
No browser cache, I tested in various browser, incognito and various computers.
I'm going crazy!
Thanks,
Davide
What language do you use ? Is italian default?
If You change back end language, still the same id ?
Jörgen
Hi,
Yes, italian default and english secondary.
If I change the backend language, when I click on new, I get always the same ID.
Thanks.
Davide
Increase the autoincrement value with 5 f.e and see what happens.
If You do not save the product, no harm done.
Jörgen
Hi Jorgen,
I just did it but I always see the same product when creating a new one... :'(
Thanks,
Davide
You need to debug what is happening at the product model level... why is the form filling and what queries are being made etc...
I think you should update to this version https://dev.virtuemart.net/attachments/1287/com_virtuemart.3.8.9.10544_package_or_extract.zip FIRST!
Somehow that reminds me to a bug, maybe it is fixed already. If not,... the problem is not the index of the table, or something like that. The problem is not storing. I am sure, when he changes the virtuemart_product_id in the form and URL to 0 it will create a new product.
The problem is the loading. He opens a product edit with id=0 and gets the data of id =X and there is the error. But as I said, please use first the most recent version. Thank you.
Hi Milbo,
thank you very much.
I did it, but I didn't solved.
I updated to the latest version too, but nothing.
Any idea on how can I solve it?
Thanks a lot.
Regards,
Davide
Buy a bronze membership https://extensions.virtuemart.net/support/virtuemart-supporter-membership-bronze-detail
and write a ticket to me at https://extensions.virtuemart.net/ticket
Hi Milbo,
just did it, thanks.
Regards,
Davide
Do you hecked your .haccess rules ?
If you cache the PHP/HTML files in admin, thee you can have this issue.
If you use cloudflare or other server caching system then you can have this issue.
Check in the product edit form if this ID is set to 7855
Try to use a link with a non existing ID
For eg
administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=100000
OR administrator/index.php?option=com_virtuemart&view=product&task=edit&cache=29102021And check if the form is empty.