• TADV_PATH is not initialised in the direct run and breaks on line 325 as plugins_loaded are loaded later than we define function tadv_page.

    Warning: include_once(TADV_PATHtadv_admin.php): failed to open stream: No such file or directory in /var/www/…/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 325 Warning: include_once(): Failed opening ‘TADV_PATHtadv_admin.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/…/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 326

    Here is the related code from tinymce-advanced.php:

    if ( ! function_exists('tadv_paths') ) {
    	/*
    	If using domain mapping or plugins that change the path dinamically, edit these to set the proper path and URL.
    	*/
    	function tadv_paths() {
    		if ( !defined('TADV_URL') )
    			define('TADV_URL', plugin_dir_url(__FILE__));
    
    		if ( !defined('TADV_PATH') )
    			define('TADV_PATH', plugin_dir_path(__FILE__));
    	}
    	add_action( 'plugins_loaded', 'tadv_paths', 50 );
    }
    
    ...
    
    if ( ! function_exists('tadv_page') ) {
    	function tadv_page() {
    		if ( !defined('TADV_ADMIN_PAGE') )
    			define('TADV_ADMIN_PAGE', true);
    
    		include_once( TADV_PATH . 'tadv_admin.php');
    	}
    }

    Instead tadv_page definition should also include a call to tadv_paths:

    if ( ! function_exists('tadv_page') ) {
    	function tadv_page() {
    		if ( !defined('TADV_ADMIN_PAGE') )
    			define('TADV_ADMIN_PAGE', true);
    		tadv_paths (); // ADDED THIS LINE
    		include_once( TADV_PATH . 'tadv_admin.php');
    	}
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘tadv_page definition should also include a call to tadv_paths’ is closed to new replies.