WordPress.org

Ready to get started?Download WordPress

Forums

NextGen Gallery prroblem - Rendering of template gallery.php failed (19 posts)

  1. god0fgod
    Member
    Posted 5 years ago #

    Rendering of template gallery.php failed is the only error I have:

    http://crytekuk.info/images

    This is a bad undescriptive error, I know. So what does it mean and how to I fix it?

    Thank you for any help.

  2. god0fgod
    Member
    Posted 5 years ago #

    I'm completely lost with this and I definitely need help, so I'll bump this topic.

  3. dj10bear
    Member
    Posted 5 years ago #

    i need help with this too, please.

  4. god0fgod
    Member
    Posted 5 years ago #

    I've added the tag "nextgen-gallery" so the plugin author may respond, as was said on http://alexrabe.boelinger.com/forums/

  5. corky
    Member
    Posted 5 years ago #

    Out of the blue, all my galleries have been replaced with "Rendering of template gallery.php failed". I am running NGG 1.2.1 My site is http://idrinkyourwine.com

  6. Alex Rabe
    Member
    Posted 5 years ago #

    Please reupload all files and check also the permission of the plugin folder nextgen-gallery/view

  7. god0fgod
    Member
    Posted 5 years ago #

    Oh, what permission is it supposed to be?

    I have 755 for the nextgen-gallery/view folder.

    I may have broke this when I had to change my file permissions for my blog because I kept getting 500 Server Errors.

    And thank you for this fast reply.

  8. dj10bear
    Member
    Posted 5 years ago #

    i tried deleting and reloading the nextgen plugin. still the same error "Rendering of template gallery-extend.php failed"... also permissions are all 755 which i think is correct. what gives? please help.

  9. dj10bear
    Member
    Posted 5 years ago #

    this is the code i am using. as you can see the first gallery works. the second does not.

    [nggallery id=1]

    [nggallery id=1 template=extend]

    http://faskates.com/1985/photos

  10. luis1950
    Member
    Posted 5 years ago #

    I get the error "Fatal error: Allowed memory size of 33554432 bytes exhausted"

    "nextgen-gallery/lib/ngg-db.php on line 429"

  11. Alex Rabe
    Member
    Posted 5 years ago #

    Have you the same failure with the wordpress default theme ? Please disable all other plugins for a test

  12. god0fgod
    Member
    Posted 5 years ago #

    I deactivated all other plugins and it doesn't work still.

    I thought this would be the case because it stopped working at a random time without any changes.

    Where is this error made? What file? I'd like to see if I can find any cause.

  13. Alex Rabe
    Member
    Posted 5 years ago #

    the file to render the output is view/gallery.php, if you want to use a template , the you need to have a gallery-extend.php file. See here for more info's : http://alexrabe.boelinger.com/2008/11/25/new-in-version-100-templates/

  14. god0fgod
    Member
    Posted 5 years ago #

    Okay, in lib/core.php where the error is made, which I found, I altered the error to give debug information. I replaced the render function with:

    function render($template_name, $vars = array ()) {
    foreach ($vars AS $key => $val) {
    $$key = $val;
    }

    if (file_exists (TEMPLATEPATH . "/nggallery/$template_name.php")) {
    include (TEMPLATEPATH . "/nggallery/$template_name.php");
    } else if (file_exists (NGGALLERY_ABSPATH . "/view/$template_name.php")) {
    include (NGGALLERY_ABSPATH . "/view/$template_name.php");
    } else {
    echo "<p>Rendering of template $template_name.php failed</p>

    DEBUG INFOMATION:
    TEMPLATEPATH: " . TEMPLATEPATH . "
    NGGALLERY_ABSPATH: " . NGGALLERY_ABSPATH . "
    template_name: ". $template_name;
    }
    }

    Now I get:

    DEBUG INFOMATION:
    TEMPLATEPATH: /home/users/web/b2863/d5.godofgod/public_html/frd/wordpress/wp-content/themes/fluid-blue-10
    NGGALLERY_ABSPATH: /home/users/web/b2863/d5.godofgod/public_html/frd/wordpress/wp-content/plugins//hermes/bosweb/web286/b2863/d5.godofgod/public_html/frd/wordpress/wp-content/plugins/nextgen-gallery/
    template_name: gallery

    So the NGGALLERY_ABSPATH is completely, bizarrely wrong. Where is that constant defined so I can fix it?

    I recommend others try replacing the function and see what they get.

  15. dj10bear
    Member
    Posted 5 years ago #

    i tried the original wordpress theme + no plugins on. still BROKE. anyone have any ideas? sounds like it never worked stock without changing code?

  16. god0fgod
    Member
    Posted 5 years ago #

    Try what i suggested to see what you get.

    I'm going to look for that constant in a little while.

  17. god0fgod
    Member
    Posted 5 years ago #

    I fixed this by finding in nggallery.php:

    define('NGGALLERY_ABSPATH', str_replace("\\","/", WP_PLUGIN_DIR . '/' . plugin_basename( dirname(__FILE__) ) . '/' ));

    And I replaced it with:

    define('NGGALLERY_ABSPATH', str_replace("\\","/", WP_PLUGIN_DIR . '/nextgen-gallery/' ));

    But now the slideshow fails and all the pictures are in one column.

  18. kerkness
    Member
    Posted 5 years ago #

    You have to modify how both NGGALLERY_ABSPATH and NGGALLERY_URLPATH are defined in order to solve this error. These are defined in nggallery.php around line 209 and 210.

    The following definitions work for me..

    define('NGGALLERY_ABSPATH', dirname(__FILE__) . '/' );
    define('NGGALLERY_URLPATH', WP_PLUGIN_URL . '/nextgen-gallery/' );

    I believe the problem is actually down to the function plugin_basename() not returning the expected response

  19. thepolarbear
    Member
    Posted 5 years ago #

    this might help, got it from an earlier post,

    Let me note :

    if you add the gallery.php (form the plugin folder) to

    {wordpress dir}\wp-content\themes\your theme directory\nggallery\gallery.php

    then you can call it with [nggallery id=x]

    if you need another template use the tag [nggallery id=x template=mysample]

    and NextGEN Gallery look for a file in

    {wordpress dir}\wp-content\themes\your theme directory\nggallery\gallery-mysample.php

    There might also be other relevant discussion on gallery ID and templates read the whole thread for more.

Topic Closed

This topic has been closed to new replies.

About this Topic