• Resolved danilocubrovic

    (@danilocubrovic)


    We have php errors when using it with transliteration plugin:
    include(/var/www/html/wp-content/plugins/quick-featured-images/admin/class-Transliteration_Plugin_Quick_Featured_Images.php): failed to open stream: No such file or directory

    It’s like your loading by error transliteration plugin from your folder and raise error.
    If I change your code with check from:

    include QFI_ROOT . ‘admin/class-‘ . $class_name . ‘.php’;
    to:
    $file = QFI_ROOT . ‘admin/class-‘ . $class_name . ‘.php’;
    if ( file_exists( $file ) ) {
    include $file;
    }

    error disappears.

    Can you fix it in update?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Kybernetik Services

    (@kybernetikservices)

    Thank you @danilocubrovic for your message.

    Quick Featured Images has over 50,000 active installation and this never happened before. What you have done is not a fix because there is a reason why Quick Featured Images wants to load a file, so I need to know what file is being loaded that does not exist. Than we have to check why the files does not exist.

    can you please change

    if ( file_exists( $file ) ) {
    include $file;
    }

    to

    if ( file_exists( $file ) ) {
    include $file;
    }
    else {
    wp_die( $file );
    }

    and let me know which file does not exist?!

    Thank you!

    Thread Starter danilocubrovic

    (@danilocubrovic)

    I already wrote that:
    include(/var/www/html/wp-content/plugins/quick-featured-images/admin/class-Transliteration_Plugin_Quick_Featured_Images.php): failed to open stream: No such file or directory
    This is the file that you trying to load.

    This is some conflict with https://www.ads-software.com/plugins/serbian-transliteration/
    We have 72 more plugins that does not report any problems so it can be fixed. Probably transliteration plugin is somewhere where you don’t expect that.

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    Sorry, I missed the information.

    class-Transliteration_Plugin_Quick_Featured_Images.php is not a filename originating from or containing in Quick Featured Images.

    The question is where the class name Transliteration_Plugin_Quick_Featured_Images comes from. This is not a Quick Featured Images class but includes the string “Quick_Featured_Images”. Thats why the autoloader wants to load the file (which does not exist).

    Can you investigate and find out where the class name comes from?

    Thread Starter danilocubrovic

    (@danilocubrovic)

    It is obvious that this is not use. Transliteration plugin do some trick for their translate features that interfere with your code. Don’t know how to find out how those class get into your classloader.

    Can you please just do some check to prevent such interference. I assume they did the some with other 70 plugins that do not conflicts around that.

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    I do already the check with

    if ( false !== strpos( $class_name, 'Quick_Featured_Images' ) ) {
    include QFI_ROOT . 'admin/class-' . $class_name . '.php';
    }

    I check if the class name includes Quick_Featured_Images. If so, the loader loads the class. The only reason why a class should have Quick_Featured_Images in its name is, it is from Quick Featured Images. So, I have to understand why a third party plugin uses Quick_Featured_Images in a class name to make sure to include the right file.

    Other plugin may not use a autoloader for classes or they include a file hardcoded.

    However, I cannot make a change in the code without understanding the background of the issue, as this change affects over 50,000 active installations.

    If I cannot understand the problem and the cause, I cannot solve it.

    Thread Starter danilocubrovic

    (@danilocubrovic)

    I assume that somehow prefix it with Transliteration_Plugin_ for some purposes.
    I’m not php guy so i do not know what to check but if you can provide some code snippet to include to your plogine and provide logs I can help with that.

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    You can ask the people from the Transliteration plugin why they give a class name of their plugin the name of another plugin. Unfortunately, I have never heard of such a plugin and have no idea what it does. However, I would be happy to understand it and solve it for you.

    Thread Starter danilocubrovic

    (@danilocubrovic)

    As I wrote they did not named it after your plugin. They do some trick that for every plugin they trie to do this with prefix their. They do some transliteration of sites latin to cyrillic and vise verse and this is what happens , but for all other plugins we do not have problems. They have some full name check or something additional to check so they do not break. Will wrote to those guys too.

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    @danilocubrovic I have published an update which has a new class autoloader. This should fix the issues you had. Please check and let me know if it works for you.

    Thread Starter danilocubrovic

    (@danilocubrovic)

    Yes, this resolves the conflict I experienced. Thank you for the quick support!

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    Thats great to read.

    If you like the plugin, I would be happy if you support my work an could leave a five-star review. Thanks!

    Thread Starter danilocubrovic

    (@danilocubrovic)

    No problem. I did!

    Plugin Author Kybernetik Services

    (@kybernetikservices)

    Thank you @danilocubrovic for your support.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.