#164 New articles not saving the price settings, table j2store_variants is missing product_id

Posted in ‘Technical Support / Bugs’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Olivier on Wednesday, 26 February 2025 15:59 UTC

Mark Prinsen

Hi,

First; thanks for continuing the J2Store software. Good work!

I ran into this problem. I've already did the migration from J2Store 3 to 4. So far so good. The site is running on PHP 8.2
But since the migration (or the PHP update) I have this problem with articles not saving the price settings and such.

I discovered; new products do get a j2store_product_id in the database table j2store_products. This refers to the table j2store_variants.
But in the table j2store_variants no new line is created with that ID number.

If I create that line manually then the webshop seems to work fine again (as far as I could test it).

I think it's related to this Deprecated meassage. When I go to New article > tab: J2Store Cart. I see:

Deprecated: Creation of dynamic property J2StoreTableProduct::$j2store_product_id is deprecated in  ... /libraries/f0f/table/table.php on line 645.

I hope you can help me with this or if there will be a bug fix soon?

Thanks ahead,
Mark

 

Adam Melcher

Mark,

 

I suspect the issue is that you may have an older version of FOF from the J3 site that causing the issue. Can you go under manage extensions and under filter > select type > library and add the screenshot in here? Have you tried Akeeba's Eraser tool which removes older FOF libraries already?

https://github.com/akeeba/magiceraser/releases/latest

 

Adam

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Mark Prinsen

Hi Adam,
Thank you for your fast reply.

yes, I used the Akeeba's Eraser tool (magic eraser) and checked the FOF / F0F libraries.
(Although I'm not certain about which version is the correct one)
See attachment.

I also send you an overview of all J2Store related extensions / plugins

 

Olivier

Hello Mark,

you seem to have the right version of f0f installed on your site.

Deprecation messages do not affect the running of the code, they are just messages that are there to inform you that the code used will be eventually become an error later in the future.

We have seen issues in the database when a table would contain a column that is not part of the core of J2Store and added in the past by an add-on that is no longer in use.

You seem to have issues with the variant table. Can you check it? You should have 33 columns total, the last column being: isdefault_variant.

Thanks!

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Mark Prinsen

Hi Olivier,

Thank you for your help. Much appreciated!

I checked the table and it has indeed een extra column at the end: campaign_variant_id. And it's completely empty!

Do you know which plugin uses this? Do you think this is causing the issue?
Any suggestions about the next step?

Kind regards, Mark

Mark Prinsen

In addition to my previous reply;
In a develop site I tested removing this extra column campaign_variant_id  in the j2store_variants table.

That seems to work for me, now when I create a new product (new article), a new line in the j2store_variants table is created and the prodcut is saved with all its details like price etc.

Do you know which plugin used or uses this extra column campaign_variant_id ?

Does removing it have any implications on other functions? I did a little bit of testing and it seems to work okay.

Kind regards, Mark

Olivier

Hello Mark,

if the column campaign_variant_id is empty, it is definitely safe to remove it. Still, make a note of it so that if you need to add it back, you can...

If an old add-on was using it, installing the new Joomla 4 version of it will add it again if needed, but this time, it won't break again because that column will be properly populated.

I am not sure what extension added the column but I don't seem to find any hint from the screenshots you sent us.

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Stay Updated

Subscribe for free and be the first to know about the latest features, updates, and new additions.