WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images II
Plugin template could not be found (3 posts)

  1. mike_hasarms
    Member
    Posted 1 year ago #

    Hi,
    Using plugin v1.33 and getting this error message:

    This plugin template could not be found: /templates/term-images.php

    I tried debugging the CategoryImagesII_Plugin->render() function around line 256.
    $template_file === false

    I don't know what brought on this problem. The site was working a while ago, and I don't know what's changed

    http://wordpress.org/extend/plugins/category-images-ii/

  2. mike_hasarms
    Member
    Posted 1 year ago #

    I think part of my problem is WP_PLUGIN_DIR in a Windows development environment can contain backslashes, while __FILE__ does not.

    This code is in class-Plugin.php

    elseif ( stripos( __FILE__, WP_PLUGIN_DIR ) !== false ) {
    			// This is a plugin
    			$this->folder = rtrim( basename( dirname( __FILE__ ) ), '/' );
    			$this->type = 'plugin';
    			$this->dir = trailingslashit( WP_PLUGIN_DIR ) . $this->folder;
    			$this->url = plugins_url( $this->folder );
    		} else {
    			// WTF?
    			error_log( 'PLUGIN/THEME ERROR: Cannot find ' . WP_PLUGIN_DIR . ' or "themes" in ' . __FILE__ );
    		}

    In my local install stripos(__FILE__, WP_PLUGIN_DIR) will ALWAYS be false (even in wp-admin because the slashes in those two paths don't match.

    Not sure if this affects my front end issue, but I couldn't manage the plugin in Admin because of this.

  3. Carsten Bach
    Member
    Posted 1 year ago #

    Same for me.
    Would be nice to have it fixed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags