Jump to content
  • 0
Jaje

Fatal error: Class 'Cache' not found

Question

I am not able to enter both of my shops as HTTP Error 500 shows saying:

"Fatal error: Class 'Cache' not found in /home/a7971671/public_html/prestashop/classes/ObjectModel.php on line 1470"

 

Anyone knows what's the problem? I am slowly going crazy...

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

Can someone at least tell me what does this error mean? Where's the problem?

Share this post


Link to post
Share on other sites
  • 0

I've updated both stores, but it worked just fine the night before and in the morning the error started to show. One of those stores I last updated a month ago and haven't touched it since and it stopped working. Version 1.5.4.1.

Share this post


Link to post
Share on other sites
  • 0

can you try to turn off cache under the preferences -> performance tab in your back office?

I just want to check if this error will appear even if the cache is turned off

Share this post


Link to post
Share on other sites
  • 0

I can't enter Back Office :( The same error pops up.

I have both shops on the same server. I was working on one, while the other shop I haven't touched for a month. Both were working just fine until yesterday morning, and they both show same error(line 1470) when trying to enter BO or Webshop. I can connect to the server and modify data but can't enter BO and Webshop.

Share this post


Link to post
Share on other sites
  • 0

on these lines there is :

[/size]
/**
 * Get object definition
 *
 * @param string $class Name of object
 * @param string $field Name of field if we want the definition of one field only
 * @return array
 */
public static function getDefinition($class, $field = null)
{
 if (is_object($class))
  $class = get_class($class);
 if ($field === null)
  $cache_id = 'objectmodel_def_'.$class;
 if ($field !== null || !Cache::isStored($cache_id))
 {
  $reflection = new ReflectionClass($class);
  $definition = $reflection->getStaticPropertyValue('definition');
  $definition['classname'] = $class;
  if (!empty($definition['multilang']))
   $definition['associations'][Collection::LANG_ALIAS] = array(
 'type' => self::HAS_MANY,
 'field' => $definition['primary'],
 'foreign_field' => $definition['primary'],
   );

  if ($field)
   return isset($definition['fields'][$field]) ? $definition['fields'][$field] : null;
  Cache::store($cache_id, $definition);
  return $definition;
 }
 return Cache::retrieve($cache_id);
}

Share this post


Link to post
Share on other sites
  • 0

Make sure that all of the cache folders exist and are set to 777. /cache and theme/cache. Without the cache folder in your active theme's directory, cache has nowhere to put the flat files it creates.

Share this post


Link to post
Share on other sites
  • 0

I have experienced the same problem but I have solved 

What I did

  • I check the classes/cache file (and I saw it was empty) 
  • I have copied and pasted all content from my another working web site
  • then it works.

Share this post


Link to post
Share on other sites
  • 0

Even myh cache file are empty from where i can i get it back i don't have other site, i am facing these problems because i restored the website from host company backup , i have old backup files but when i try to upload old backup files it's not resolving my issue.

Help

Have gone mad 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×