Jump to content

1.6.1.4 If Clear Cache, Class_Index.php File Re-Genetare Without Inforation About Override Classes


Kerm

Recommended Posts

If clear cache, class_index.php file re-genetare without inforation about override classes.

 

I also have same problem on 1.6.1.3.

 

At this time i fix this issue by manual removal this file using ftp and reload page....

Link to comment
Share on other sites

I have not seen this issue...so you are saying, when you delete/or refresh with ps clear cache button, overrides are not seen?  check back office->advan parms-->performance and make sure ovrerrides are not disabled..

 

01.22.2016-18.38.png
http://screencast.com/t/7xgTcADG

 

hey Kerm, you are a moderator and know not to 'bump/up' topic without puttting in something new..lol  please do 50 push up as repentance.

Link to comment
Share on other sites

update, I just ran across issue with one of my modules on 1.6.1.3, native would not bring in the override into override/classes

 

What I found is I my override name in module/modulename/override/classes/tools.php is all lower case and would not be installed by PrestaShop because

 

I changed the overide name to Tools.php

 

worked correctly

 

hope that helps

Link to comment
Share on other sites

I have not seen this issue...so you are saying, when you delete/or refresh with ps clear cache button, overrides are not seen?  check back office->advan parms-->performance and make sure ovrerrides are not disabled..

 

01.22.2016-18.38.png

http://screencast.com/t/7xgTcADG

 

hey Kerm, you are a moderator and know not to 'bump/up' topic without puttting in something new..lol  please do 50 push up as repentance.

 

Hello, thx, in my case it was right that you say. All overrides was turn it off.

And btw if made post and as usual no one will answer....and if question is important, with out bumping, you never got answer...as you see i bump my question and you answer and help me, so it works!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I have not seen this issue...so you are saying, when you delete/or refresh with ps clear cache button, overrides are not seen?  check back office->advan parms-->performance and make sure ovrerrides are not disabled..

 

01.22.2016-18.38.png

http://screencast.com/t/7xgTcADG

 

hey Kerm, you are a moderator and know not to 'bump/up' topic without puttting in something new..lol  please do 50 push up as repentance.

even if that worked... this is a bug

 

what debug mode has to do with the cache clear?

you are NOT in debug mode... so that's a bug

 

that option should be considered when you are in debug mode only... otherwise it's meaningless and misleading

p.s.: unless they mean that with that option enabled you don't need to manually set _PS_MODE_DEV_ to true into defines.inc.php

Edited by mmsh (see edit history)
Link to comment
Share on other sites

even if that worked... this is a bug

 

what debug mode has to do with the cache clear?

you are NOT in debug mode... so that's a bug

 

that option should be considered when you are in debug mode only... otherwise it's meaningless and misleading

p.s.: unless they mean that with that option enabled you don't need to manually set _PS_MODE_DEV_ to true into defines.inc.php

 

check back office->advan parms-->performance

 

if shop disabled overrides, then they will not be guild into cache file. 

 

This has nothing to do with enable ps debug mode for php errors, etc.  

 

My suggestion is you open a new topic with your specific question.

Link to comment
Share on other sites

  • 10 months later...

Hello El Patron,

 

I have been trying to work out what the solution was in this post. Was is just changing the name of the override file to match the case - ie Tools.php instead of tools.php?

 

I am experiencing the same issue. I am trying to override the checkZipCode method within Country.php, but my override is ignored.

 

I put my new Country.php method into the override/classes/ folder and then deleted the cache/class_index.php file. The new cache/class_index.php file is regenerated immediately, but it still shows false for the CountryCore override. 

 

I have checked that Advanced Parameters->Performance->Disable All Overrides is set to No. I also double checked that my override filename is Country.php (ie identical to the file it is overriding) and the class CountryOverride extends CountryCore statement is also in the right case.

 

There must be something else that causes overrides to be ignored, but I can't see it right now.

 

Any ideas would be very much appreciated.

Link to comment
Share on other sites

I discovered the problem.

 

The override class must have a specific name. In my example above, my opening statement in the override file was

<?php
  
  if (!defined('_PS_VERSION_'))
    exit;
    
  
  class CountryOverride extends CountryCore
  {
  
    /* Override code */
      
  }  
?>

That does not work. In order for the override to work, it must be:

<?php
  
  if (!defined('_PS_VERSION_'))
    exit;
    
  
  class Country extends CountryCore
  {
  
    /* Override code */
      
  }  
?>

No name except Country will work for the override class. If it is called anything else, it is ignored in the regenerated class_index.php. It appears that when overriding a class, one must first check the class_index.php file to find the name of the method to use for the override. This will usually be near to the methodCore.

Link to comment
Share on other sites

  • 2 weeks later...

Hi All,

Pls. help...

 

I am using Prestashop version 1.6.1.10 I have clear cache, already click to Recompile templates if the files have been updated and SAVE....

 

Also rename two folders in smarty >> Cache and Compile...

 

But the data is not refreshed yet, most of my machines are showing old data...

 

Pls. help what to do....

 

Reg

Jugesh Sabharwal

JK Webcom

 

www.jkwt.co.in

Link to comment
Share on other sites

Hi All,

Pls. help...

 

I am using Prestashop version 1.6.1.10 I have clear cache, already click to Recompile templates if the files have been updated and SAVE....

 

Also rename two folders in smarty >> Cache and Compile...

 

But the data is not refreshed yet, most of my machines are showing old data...

 

Pls. help what to do....

 

Reg

Jugesh Sabharwal

JK Webcom

 

www.jkwt.co.in

 

Try delete file class_index.php in site.com/cache/class_index.php

Link to comment
Share on other sites

  • 4 weeks later...

I'm using 1.6.11

 

I need to delete manually the site/cache/class_index.php each time I clear the cache of the site.

 

In the Advanced Parameters->Performance If I try to set NO in Disable All Overrides and saving it, it returns to Yes. Seems it not accepts the modification.

Edited by NetVicious (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 7 months later...

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
×
×
  • Create New...