cancel
Showing results for 
Search instead for 
Did you mean: 

Error save products: Interceptor does not exist

Error save products: Interceptor does not exist

Hello,

 

I don't known how it happens this error, maybe after install some module.

Now when I try to save a simple product, I get the next eror:

Class Magento\CatalogRule\Model\Indexer\Product\ProductRuleIndexer\Interceptor does not exist

That's amazing for me !!! How magento can be so weak. What I did to broken interceptor index ? And how I can solve it?

 

I read in other post that I should change the permissions from three folders, get writing permissions:  

chmod -R 777 var/ pub/ generated/ 

and bin/magento setup:di:compile

but I get an error warning unlink .... and permission denied 

 

Captura de pantalla 2020-11-21 a las 2.23.41.png

 

 

5 REPLIES 5

Re: Error save products: Interceptor does not exist

@birdawn 

 

The error permission denied is your server related, the user you are using to give permission doesn't have enough access provided to change permission, contact your hosting provider to access or just append sudo in starting before command :

sudo chmod -R 777 var/ generated/ pub/static/ pub/media/

 

And then after giving permission run indexer command :

php bin/magento indexer:reindex

 

try the same process again, hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Error save products: Interceptor does not exist

@birdawn ,

kindly check the configured Apache/Nginx user. 

you need to change the ownership to that user and after that give 777 permission to var & generated folders. 

 

Step1: Remove generated files and cache

rm -rf var/cache/* generated/code/* var/page_cache/* var/view_preprocessed/*

Step2: Update ownership & permissions 

 

eg. user: www-data 

to change the ownership 

chown -R www-data generated/ var/ pub/

to give permission 

chmod -R 775 generated/ var/

kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

Re: Error save products: Interceptor does not exist

May I ask you before apply your solution, why I should change the permissions and decrease the security if before works with current permissions. Already I checked the original folders permissions.

In your solution, should set definitely 777 to that folders or is temporary. It’s secure leave on 777 ?

Thank you in advance

Re: Error save products: Interceptor does not exist

@birdawn try changing the ownership and give 775 permission for var & generated folders.

 

Re: Error save products: Interceptor does not exist

Hi @amitsamsukha  Thank you for reply and try to help me with this issue.

As I expect from the beginning solution isn't give more permissions to the files and folders because this increase the vulnerability. set permissions to 777 isn't the solution and can't leave files and folders like this.

 

In my case Magento can't access to some folders and files because do not had permission, permissions and groups was incorrect, the owner of this files was root, I guess the administrator of hosting did something wrong.

 

Already I ask for change the permissions to Magento user and everything works.

Thank you very much for reply and try to help me in this issue.
I would like to remark that the solution isn't change the permissions to 777 because this make security vulnerable.
The issue is solved.