WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Yet Another Related Posts Plugin] YARPP 3 b3: templates don't work (7 posts)

  1. Nathira
    Member
    Posted 5 years ago #

    I have a problem with the new template function.
    As soon as I enabled a template it did not show up in my theme (but it works fine without a template). The widget in my sidebar only showed the heading but no related posts. I got no warnings and no errors.
    My folders are installed exactly where they should be as stated in the install.txt.
    Then I removed YARPP and everything related to it out of my database.
    When I do a clean install of YARPP I get errors showing up in my Apache error log:
    Duplicate key name 'yarpp_title'
    Duplicate key name 'yarpp_content'
    And something with the following, but it does not say whats wrong with it:
    CREATE TABLE IF NOT EXISTS wp_yarpp_keyword_cache
    CREATE TABLE IF NOT EXISTS wp_yarpp_related_cache
    Those errors only appear when I activate the plugin.

    Next I disabled other plugins and found one that was hiding warnings in my theme.
    So with a template enabled I get now these two warnings in my theme:

    Warning: include(../yarpp-templates/template-list.php) [function.include]: failed to open stream: No such file or directory in G:\!Xampp\xampplite\htdocs\wp\wp-content\plugins\yet-another-related-posts-plugin\magic.php on line 260

    Warning: include() [function.include]: Failed opening '../yarpp-templates/template-list.php' for inclusion (include_path='.;G:\!Xampp\xampplite\php\pear\') in G:\!Xampp\xampplite\htdocs\wp\wp-content\plugins\yet-another-related-posts-plugin\magic.php on line 260

    My WP 2.7.1 is currently running only on localhost, so I can't give a link to you.
    Unfortunately I have no clue of PHP, so I can't fix it myself. Any help would be appreciated.

    Greetings,
    Manu

  2. na3s
    Member
    Posted 5 years ago #

    I've got the same issue, Mitcho, any input? Can't seem to find the problem, the code looks fine, and the file appears to exist...

  3. @Nathira, @na3s - Whoah, sorry, I was able to reproduce this issue as well... nix my previous edit. I'm looking into this right now...

  4. Hi all,

    If you are so bold, please replace line 260 of magic.php with the following code:

    include(WP_CONTENT_DIR.'/plugins/yarpp-templates/'.$template_file);

    (The line originally was include('../yarpp-templates/'.$template_file);)

    This fixed the bug for my setup. I will release this bugfix tonight as beta 4.

    mitcho

  5. Nathira
    Member
    Posted 5 years ago #

    Thank you :) It worked for me too.

  6. houseofstrauss
    Member
    Posted 5 years ago #

    Thanks for the update on the template issue. The new include line fixed the problem.

  7. I just released YARPP 3.0b4: http://www.hurl.ws/n6a . This version also makes it so the "example code" display in the options screen actually uses the active template.

Topic Closed

This topic has been closed to new replies.

About this Topic