MammothMKIV / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

Clear cache on Update #570

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.7.13-pl
WordPress Version: 3.9.2
PHP Version: 5.5.11
MySQL Version: 5.1.68-community
Server OS: Linux
Language: 
------------------------ 
ACTIVE PLUGINS: 
 * Polylang v.1.5.4 [http://polylang.wordpress.com/]
 * Custom Content Type Manager : Advanced Custom Post Types v.0.9.7.13 [http://code.google.com/p/wordpress-custom-content-type-manager/]
 * TinyMCE Advanced v.4.0.2 [http://www.laptoptips.ca/projects/tinymce-advanced/]
 * WordPress SEO v.1.5.6 [https://yoast.com/wordpress/plugins/seo/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpseoplugin]
------------------------ 
CURRENT THEME: FINANCIAL ASSETS v.0.1 http://www.tusch.nl

I had/have an issue with loading certain CCTM files after my hosting provider 
made a change in the webroot path.
The error was: Failed to open stream, not such file etc

The webpath was:
/var/www/vhosts/5/108020/webspace/httpdocs > WORDPRESS FILES

And changed into
/var/www/vhosts/13/108020/webspace/httpdocs > WORDPRESS FILES

My first thought in trying to fix it was:

De- and reactivating all other plugins did not help
Changing the WP-permalinks back to the default did not work either

Deactivate and Reactivate the CCTM plugin. I hoped that with a renewed 
activation hook the correct PATH CONSTANT __FILE__ would be stored.

Reinstall Wordpress in order to start with correct PATH CONSTANT __FILE__

Both ideas are senseless since the PATH CONSTANT __FILE__ is created at run-time

After a lengthly discussion with the hosting party, i tried clearing the cache 
in the CCTM admin menu. And presto, all works well.

My suggestion:
Is it possible that the plugin ON UPDATE could run a check to see if the 
chached PATH is the same as the current PATH (on update)
If not > automatically clear the cached CCTM files

Thanks for a otherwise superb plugin,

Grasland

Original issue reported on code.google.com by tuschams...@gmail.com on 28 Aug 2014 at 1:03

GoogleCodeExporter commented 8 years ago
Unfortunately, WordPress uses some uncommon and not very sensible tactics when 
it comes to defining its installation directory, so it does not handle 
migrations or changing docroots very gracefully.

I'm changing the title here to reflect the improved behavior.

Original comment by ever...@fireproofsocks.com on 28 Aug 2014 at 2:07

GoogleCodeExporter commented 8 years ago

Original comment by ever...@fireproofsocks.com on 28 Aug 2014 at 2:11

GoogleCodeExporter commented 8 years ago
Probably best to avoid caching altogether or find an extraordinary package to 
support it.  Look for more better in Github.

Original comment by ever...@fireproofsocks.com on 11 May 2015 at 5:36