Titan-Framework icon indicating copy to clipboard operation
Titan-Framework copied to clipboard

Plugin Loading Order

Open tajenli opened this issue 9 years ago • 4 comments

I created couple plugins based on Titan Framework. One is working fine. In the other one, I always get "Fatal error: Class 'TitanFramework' not found in {my plugin file} ...".

After some debugging efforts, I found it's the plugin loading order issue. My plugin was loaded before the "Titan Framework".

To fix it, I need to do 2 things:

  1. Add prefix "z_" to my plugin folder name.
  2. Titan Framework must be activated first, then activate my plugin.

This is quite annoying.

So here is my suggestion, if you can change the folder "titan-framework" to "aa_titan-framework". Then this issue is solved.

Thanks, Darren

tajenli avatar Sep 22 '16 03:09 tajenli

You need to 'require_once( 'titan-framework-checker.php' );' at the top of your plugin file

ReggieDuran avatar Sep 27 '16 10:09 ReggieDuran

Ya, require_once( 'titan-framework-checker.php' ); has the same issue.

Anyway, I just add "the_" or "z_" to my plugin folder, it solves the problem (I am working in a multisite environment).

I want to say thank you for this great plugin. It helps me creating pro options page so much easier. I will try to work on repeater fields (like ACF) when I have some free time.

tajenli avatar Sep 27 '16 14:09 tajenli

Thanks @tajenli! We're looking forward to make titan compatible in multisite also. Just let us know if you're facing other problems in titan framework.

ReggieDuran avatar Oct 03 '16 03:10 ReggieDuran

I have this issue too and I'm on a normal single (non-multisite) setup.

codeclinic avatar Jul 12 '19 11:07 codeclinic