Symfony: property does not exist - 500 Internal Server Error - ReflectionException

I deleted $hearAboutIndustry from the object and now I get the error below only on the production server, and not on the local and intermediate server! Any idea why or solution?

 Property Tete\AdminBundle\Entity\Customer::$hearAboutIndustry does not exist 500 Internal Server Error - ReflectionException 

config_prod.yml

 doctrine: orm: metadata_cache_driver: apc result_cache_driver: apc query_cache_driver: apc 

What am I doing to solve it so far:

  • Removed recipients and setters from the object.
  • Deleted entire folders of caches and logs and re-created back, including 777.
  • Just in case, run cache:clear --env=prod
  • Search hearAboutIndustry in all project directories / files. No reference.
  • Run doctrine:schema:update . DB is updated.
  • Run doctrine:generate:entities . Object updated.
  • Application / Console Doctrine: cache: clear-metadata li>
  • app / console doctrine: cache: clear-query
  • app / console doctrine: cache: clear-result
+5
source share
5 answers

As Adam said in a comment, it is better to restart apache if all of the above solutions have been tried and failed. Decision:

sudo apachectl graceful

+5
source
  • php app / console doctrine: cache: clear-query --env = prod

Delete all query cache entries

  • php app / console doctrine: cache: clear-result --env = prod

Delete all result cache entries

  • php app / console doctrine: cache: clear-metadata --env = prod

Delete all metadata cache entries

  • php app / console cache: clear --env = prod

Flushing cache for prod environment using debug false

And don't forget to put --env = prod in your commands

+4
source

"Old, but it still happens" If none of the solutions mentioned above works, try deleting the object cache file manually: (for example, the path of the Entity entity file must be like this)

projectdirectory \ projectname \ var \ cache {dev or prod} \ jms_serializer \ Tete-AdminBundle-Entity-Customer.cache.php

0
source

I had a similar problem, I just used the doctrine: mapping: import and that’s it.

Greetings

0
source

We had the same problem, and in our case (Nginx) restarting Nginx did not help.

But restarting memcache was the right solution:

 sudo service memcached restart 
0
source

Source: https://habr.com/ru/post/1205630/


All Articles