Question: Does this hack automatically delete the cached template when the template is changed or updated? Mine is doing something strange. The only way I can view an updated template in the browser is to turn off your cacher, update the template, load the page.
Then I turn the cacher back on.
It seems as if the cache is still there until I turn the cacher off.
I've got the same problem ... but I uploaded it to the correct folder, my forums folder. I can't give an url cause it's currently on our test site. When I uploaded the php file also to the AdminCP directory, the problem was solved (and options.php could find it, in the AdminCP directory, but the file should be normally only in the forums folder).
Edit: I could fix it easily by correcting the product file:
Change the include of the two admin plugins (admin_global and admin_options_processing) to:
PHP Code:
include_once('./template_cache.php');
instead of
PHP Code:
include_once('template_cache.php');
Note: a require_once function would be better instead of a include_once (also just to follow the vBulletin coding standards).
Edit 2: I discovered a new bug, the archive isn't working any more, you need to add a plugin there too.
I don't know, the plugin works for as distributed (archive works too). Do you have any special settings? Plugins that modify the archive?
Quote:
Originally Posted by Kihon Kata
Hi Orban! Merry Christmas.
Question: Does this hack automatically delete the cached template when the template is changed or updated? Mine is doing something strange. The only way I can view an updated template in the browser is to turn off your cacher, update the template, load the page.
Then I turn the cacher back on.
It seems as if the cache is still there until I turn the cacher off.
LMK what this means.
Thanks!
Yes, it should automatically deleted all cached templates when a template is edited/removed/added.
I don't know, the plugin works for as distributed (archive works too). Do you have any special settings? Plugins that modify the archive?
Not that I'm aware of and no plugins for the archive. I don't have any mods that modify vBulletin a lot, only general things like vBadvanced, DownloadsII, glossary, v3 Arcade, Photoplog, ...
Just like Kihon Kata said, changes aren't saved in the template cache on my site also and I need to turn it off and on again for that.
Most of those plugins modify vB quite a lot (use a lot of hooks). So it's quite easy for them to mess something up. Can you try to enable them 1 by 1 on a dev board so we can track down the culprit? I can then maybe give you a fix.
I disabled all products, still the same two problems (and there are no file edits).
But I think it's just the same problem like I had after enabling the mod in the options, the include statement is wrong (I posted a fix for the Admin/options problem).
I changed the third instance of the include statement too and the archive was fixed (without creating new errors on other parts of the site)
The template saving bug isn't solved with it.
works on all servers, but it seems that the current one (without ./) is being picky for some servers. I don't know why also, but all vBulletin includes are like this.
Why not change it also if it works like that for everyone
Thanks for the clear cache update, it works fine now.
So, switching to "require_once('./template_cache.php');" and using the new template_cache fixed all your problems?
My idea is that include() is weaker. If you upgrade your board, move to a new server, and forget template_cache.php, it won't break anything if you miss the file, because include() will just complain about a missing file then. Require will stop the execution.