• Nathira

    (@nathira)


    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • na3s

    (@na3s)

    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…

    @nathira, @na3s – Whoah, sorry, I was able to reproduce this issue as well… nix my previous edit. I’m looking into this right now…

    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

    Thread Starter Nathira

    (@nathira)

    Thank you ?? It worked for me too.

    houseofstrauss

    (@houseofstrauss)

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

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] YARPP 3 b3: templates don’t work’ is closed to new replies.