Reputation: 2626
I'm trying to do something very basic: edit a small part of the category product pager template. I copied pager.phtml
from .../base/default/template/page/html/
into my own theme's template/page/html
folder and changed what I needed changed in the new file. Unfortunately, nothing is changed on the frontend.
I've tried enabling "Template Path Hints" and it definitely shows my custom template being loaded. When I blank out my theme's pager.phtml
, all the content stays (as if its still loading the default template). When I edit the default template, still nothing changes! Ah ha! It must be cached...
But I've got the caches disabled (its a development site) and tried refreshing them all anyway. Nothing changes. I've edited many a template on this site and they've all worked as expected, its only pager.phtml
that is giving me trouble.
If anyone could point me in the right direction or even toss a few more debugging ideas my way, that would be great. Thanks in advance.
Upvotes: 0
Views: 5431
Reputation: 1494
Check your design settings in System->Config->General->Design->Package (example: default) System->Config->General->Design->Themes->Default (set your theme directory name).
Upvotes: 0
Reputation: 2151
If your caches are off, and you editing the base/default
package/theme has no effect, it sounds like you are editing the wrong file ...
By chance is it a 1.3 template on a 1.4 build - as the pager set-up changed between the two versions and would lead to peculiar issues like you are describing.
Have you tested overriding another .phtml
file to see if it actually works (ie. if you have set it up correctly).
Finally, caching being the last resort, have you got APC/Eaccelerator installed with the mtime
/stat
parameter set to false? As this would ignore the file modified time and serve up data directly from its internal cache. An Apache/PHP restart would prove this.
Verify by running
php -i | grep mtime
php -i | grep stat
Or by creating a test phpinfo();
file
Upvotes: 2
Reputation: 166166
Tripple check the paths. Seriously, something about working with Magento makes people (myself included) miss things that are one level below the obvious.
Once you've done that, jump to
app/code/core/Mage/Core/Block/Template.php
Find the lines that include the template file
$includeFilePath = realpath($this->_viewDir . DS . $fileName);
if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
include $includeFilePath;
} else {
Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, null, true);
}
and add debugging code to figure out why your phtml isn't being included.
Upvotes: 4
Reputation: 2790
Also try:
Is the site using litespeed or any other caching utility? May have to clean those caches as well.
Upvotes: -2