Hi,
the upgrade to version 1.1.2 should resolve this problem. If not, please, let me know.
I have the same problem with WordPress 3.4.1. and the last version of NextGEN Gallery Field add-on. Any idea?
Hi, sorry for this mistake. Version 1.2.1 fixed this problem.
Best, Ales.
Really thanks!!!
Good job!
Best, Cri
Unfortunately when I upgraded to version 1.2.1, I still get the same error message as above on my editing screen, nor do my slideshows work. I reverted to version 1.0.2 and it works fine.
Hi,
yes, because there was a change in the saving of variables to database from version 1.2. Just try to re-save the post. The error should disappear. If not, let me know please.
Ales
I tried resaving the post and that’s when I see the “[Gallery Not Found]” message on the post (after refreshing.
Could you post part of the code of your template file with the API, please?
<div id="header-image">
<?php if(is_front_page()) { ?>
<?php
if (function_exists("nggSlideshowWidget"))
nggSlideshowWidget(3,960,460);
?>
<? } else { ?>
<?php
$garr = get_field('nextgen_gallery_id');
$gid = 0;
if(is_array($garr))
{
if(isset($garr[0])) {
$gid = intval($garr[0]);
}
if($gid > 0) {
echo nggShowGallery($gid);
} else {
?>
<?php
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
// We need to figure out what the minimum width should be for our featured image.
// This result would be the suggested width if the theme were to implement flexible widths.
$header_image_width = get_theme_support( 'custom-header', 'width' );
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
}
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= $header_image_width ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID );
elseif ( get_header_image() ) :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
$header_image_height = get_custom_header()->height;
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
$header_image_height = HEADER_IMAGE_HEIGHT;
}
?>
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
<?php endif; ?>
<?php
}
}
else
{
?>
<?php
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
// We need to figure out what the minimum width should be for our featured image.
// This result would be the suggested width if the theme were to implement flexible widths.
$header_image_width = get_theme_support( 'custom-header', 'width' );
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
}
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= $header_image_width ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID );
elseif ( get_header_image() ) :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
$header_image_height = get_custom_header()->height;
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
$header_image_height = HEADER_IMAGE_HEIGHT;
}
?>
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
<?php endif; ?>
<?php
} }
?>
</div>
Hi, well, could you still send what return $garr variable?
add this code:
print_r ($garr)
;
after:
$garr = get_field('nextgen_gallery_id');
and send value of the variable $garr. You should see it on the page within browser.
Hello,
I never was able to figure this out months ago. The site is now ready to go live, other than this problem. I have upgraded all plugins and we are running WP 3.5. I still get the same errors as listed in my initial post, and the galleries do not appear and say [Gallery Not Found].
When I added the code above, I get this on my page:
Array ( [0] => Array ( [ngg_id] => 11 [ngg_form] => gallery ) ) [Gallery not found]
I am not very well versed in PHP…what does this mean?
Hi, sorry for long delay….
try use this: $gid = intval($garr[0][ngg_id]);
.
A.