cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot open products anymore!!

SOLVED

Cannot open products anymore!!

Hi,

 

I'm trying for some time now to solve this issue: I cannot open a product anymore. When trying to open a product this is the error on the page: 

There has been an error processing your request

Class WeltPixel\GoogleCards\Model\Config\Source\ItemConditionsOptions does not exist

the theme (smartwave/porto) came with WeltPixel extensions, this caused some issues and I removed all Weltpixel extensions from /vendor/ and installed them in /app/code/

even this didn't change this issue. also diabling the module or removing the googlecards module doesn't change the error.

I keep getting this error above and I'm unable to change prices or anything else from a product.

 

Is there anyone out there who could help me to solve this error?

much appreciatedSmiley Happy kind regards

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cannot open products anymore!!

Ahh, I see what could be the problem here.

 

When you installed the WeltPixel module, it added some attributes to the product entity. Unfortunately, just disabling the WeltPixel module does not automatically undo what the module has done.

 

In other words, the module added a new attribute to the product entity, but disabling the module has not removed the attribute from the product entity. This could've been added to an uninstall script, but evidently this hasn't happened. 

 

So the advice from WeltPixel appears to be correct - your products are not loading because when Magento loads a product in the admin, it also loads all the attributes which are assigned to that product. Some attributes have special classes which Magento uses to provide the values for those attirbutes - for example: Yes/No, or a dropdown of options (e.g. Countries, Currencies, etc). Magento has built-in classes which provide these options. However, it is also possible that an attribute can have a class to provide any kind of custom value. These custom classes are defined in the eav_attribute table in the database. It looks like the WeltPixel module has added one of these custom classes to an attribute it added to the product entity.

 

The solution, therefore, is to either reinstall the module, so Magento will then be able to find and load that custom class again, remove the attribute from the attribute set in the admin, or finally (and this is the most invasive approach) delete the reference to the custom class which is stored in the database. Any of those should work.

 

Good luck!





Magento Certification Directory:

https://u.magento.com/certification/directory/dev/498894/

Commerce Hero:

https://commercehero.io/simonfrost

View solution in original post

10 REPLIES 10

Re: Cannot open products anymore!!

It sounds like you need to clear your cache.

Run this command:

php -f bin/magento setup:upgrade




Magento Certification Directory:

https://u.magento.com/certification/directory/dev/498894/

Commerce Hero:

https://commercehero.io/simonfrost

Re: Cannot open products anymore!!

Hi @ProcessEight,

 

Thank you for your reply,

unfortunately this isn't helping or solving my issue. I've deleted caches couple of times. I also disabled the googlecards module and yesterday I've removed it but this error stays no matter what I do, so I added the module again and now disabled it.

 

when looking in my browser console it gives: 

Refused to apply style from 'https://mydomein//data/web/magento2/pub/errors/default/css/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Re: Cannot open products anymore!!

Are you running in developer mode or production mode?

Which precise version of Magento are you running?

 

If you want to be absolutely sure that Magento is not using any cached data, make sure these folders are cleared, then try again:

var/cache/*
var/generation/*
generated/*
var/di/*
var/tmp/*
var/page_cache/*
var/view_preprocessed/css/frontend/*
var/view_preprocessed/js/frontend/*
var/view_preprocessed/source/frontend/*
pub/static/frontend/*
pub/static/_requirejs/frontend/*

 

If, after clearing all that, you still get the error, then it could be that another module has declared a dependency on the WeltPixel\GoogleCards module. try looking in the module.xml file of all the modules installed by the theme to see if that is the case.





Magento Certification Directory:

https://u.magento.com/certification/directory/dev/498894/

Commerce Hero:

https://commercehero.io/simonfrost

Re: Cannot open products anymore!!

Hi @ProcessEight,

 

Thank you so much for your time and help!

unfortunately this all didn't solve the issue. The xml's also don't show a declaration to googlecards. the only thing is they are connected to a main backend module and in the googlecards xml it is declared to magento catalog: 

 

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="WeltPixel_GoogleCards" setup_version="1.0.5">
<sequence>
<module name="WeltPixel_Backend"/>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>

 

I'm thinking of trying to disable and remove all WeltPixel modules and try to reinstall again, I really don't know what to do as i cannot add or change products.

 

I'm on developer mode, magento version 2.2.4

 

I've got an answer from support WeltPixel but really don't know what to do with their information:

You can try to manually clear the source_model field for the item_condition attribute in the database.  Reindex, clear caches.
UPDATE eav_attribute SET source_model='' where attribute_code='item_condition';

Also, you can go to Magento admin - attribute sets and remove the item_condition attribute from all attributes sets. 

As reading this I would think it has to do with the new magento feature about used products etc.

 

 

Re: Cannot open products anymore!!

Ahh, I see what could be the problem here.

 

When you installed the WeltPixel module, it added some attributes to the product entity. Unfortunately, just disabling the WeltPixel module does not automatically undo what the module has done.

 

In other words, the module added a new attribute to the product entity, but disabling the module has not removed the attribute from the product entity. This could've been added to an uninstall script, but evidently this hasn't happened. 

 

So the advice from WeltPixel appears to be correct - your products are not loading because when Magento loads a product in the admin, it also loads all the attributes which are assigned to that product. Some attributes have special classes which Magento uses to provide the values for those attirbutes - for example: Yes/No, or a dropdown of options (e.g. Countries, Currencies, etc). Magento has built-in classes which provide these options. However, it is also possible that an attribute can have a class to provide any kind of custom value. These custom classes are defined in the eav_attribute table in the database. It looks like the WeltPixel module has added one of these custom classes to an attribute it added to the product entity.

 

The solution, therefore, is to either reinstall the module, so Magento will then be able to find and load that custom class again, remove the attribute from the attribute set in the admin, or finally (and this is the most invasive approach) delete the reference to the custom class which is stored in the database. Any of those should work.

 

Good luck!





Magento Certification Directory:

https://u.magento.com/certification/directory/dev/498894/

Commerce Hero:

https://commercehero.io/simonfrost

Re: Cannot open products anymore!!

YEAH!!! @ProcessEight

 

Thank you so much for your explanation, that really helped me understanding the issue.

I removed the module and imstalled it again.

Then the issue still was there, so I went through all the attribute sets and removed the attribute.

I'm so happy that worked! as working on databases is not my favSmiley Happy

 

Thank you and wishing you a great weekend!

Re: Cannot open products anymore!!

Could you enlighten me and tell us what attribute?  I just got this error, followed all the above suggestions and I can't see any attributes in my attribute sets.

 

Thanks

Re: Cannot open products anymore!!

Hi @ianbutler

 

Sorry to hear you're encountering the same issue.

For me it was the "item_condition" attribute, at the product it gives an option now to adjust if a product is new, used or whatever condintion. This attribute is automatically added to attribute sets, you have to open every attribute set and search for this 'item_condition' attribute and remove it from the attribute sets, when done and setup upgrade and cache remove, it will work again.

 

good luck

Re: Cannot open products anymore!!

Thanks for super fast reply!  

I just removed item_condition from the default set and without clearing the cache I could edit one of my default parts!

I'll finish the rest of my attribute sets and clear the cache anyway.

 

Thanks!!