I use clean install of ZP 1.31. Errors occur for me in default theme. I search for a tag and am able to view resulting thumbnails and image details without any issues. However, if I create dynamic album based on same conditions, as soon as I view an image's details, I receive these errors:
Notice: Bad gallery in instantiation of album fauna/amphibians/all-amphibians.alb. in /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/class-album.php on line 40
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php on line 1552
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 111
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 112
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 113
The images still displays below the errors.
Comments
I have not ever activated the j_carousel plugin.
Active plugins listed are
class-video v1.3.1
contact_form v1.3.1
deprecated-functions
filter-zenphoto_seo v1.3.1
hitcounter v1.3.1
html_meta_tags v1.3.1
print_album_menu v1.3.1
security-logger v1.3.1
sitemap-extended v1.3.1
tiny_mce v1.3.1
zenpage v1.3.1
zenphoto_news v1.3.1
zenphoto_sendmail v1.3.1
Your problem must then be something else. Sorry, but neither Acrylian nor I can reproduce it except in the zenpage theme with jcarousel enabled.
Please check the debug log. There should be further information contained in it.
I do see `$_zp_gallery` listed as a global for that function, so I'm not sure why it would be bad unless it hadn't been instantiated or some such.
Part of recent log shows:
{Sun, 22 Aug 2010 03:29:09 GMT} Zenphoto v1.3.1[5736]
from index.php [45]
Backtrace: Bad gallery in instantiation of album flora/all-plants.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
Backtrace: Bad gallery in instantiation of album flora/all-plants.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
Backtrace: Bad gallery in instantiation of album fauna/amphibians/all-amphibians.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
Backtrace: Bad gallery in instantiation of album fauna/amphibians/all-amphibians.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
Backtrace: Bad gallery in instantiation of album fauna/amphibians/amphibians.alb.
`if (!is_object($_zp_gallery)) $_zp_gallery = new Gallery();`
Thanks so much for your assistance.
`
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php:1) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php:1) in /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php on line 1553
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php:1) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 111
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php:1) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 112
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/testgalleries/zp-core/functions.php:1) in /home/content/n/a/t/naturalenq/html/testgalleries/index.php on line 113
`
I expect I'm placing it incorrectly or leaving out something? Wasn't sure if I needed to include {}, e.g.
In functions.php, beginning of function is
`
function handleSearchParms($what, $album=NULL, $image=NULL) {
global $_zp_current_search, $zp_request, $_zp_last_album, $_zp_search_album_list, $_zp_current_album,
$_zp_current_zenpage_news, $_zp_current_zenpage_page;;
$_zp_last_album = zp_getCookie('zenphoto_last_album');
if (is_null($album)) {
if (is_object($zp_request)) {
$reset = get_class($zp_request) != 'SearchEngine';
} else {
$reset = $zp_request;
}
if ($reset) { // clear the cookie if no album and not a search
if (!isset($_REQUEST['preserve_serch_params'])) {
zp_setcookie("zenphoto_search_params", "", time()-368000);
}
return;
}
}
if (!is_object($_zp_gallery)) $_zp_gallery = new Gallery();
$context = get_context();
$params = zp_getCookie('zenphoto_search_params');
`
About the only circumstance I can think of for this to fail is to be loading zenphoto from within some other set of scripts like Wordpress.
`
Notice: Bad gallery in instantiation of album birds.alb. in /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php on line 40
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/test/zp-core/functions.php on line 1552
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/test/index.php on line 111
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/test/index.php on line 112
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/test/index.php on line 113
Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/naturalenq/html/test/zp-core/class-album.php:40) in /home/content/n/a/t/naturalenq/html/test/themes/default/image.php on line 2
`
This is the entire log:
`
{Tue, 24 Aug 2010 02:41:37 GMT} Zenphoto v1.3.1[5736]
Backtrace: Bad gallery in instantiation of album birds.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
`
So what else can we check here? I can post link to this small test directory if it helps.
`global $_zp_current_search, $zp_request, $_zp_last_album, $_zp_search_album_list, $_zp_current_album, $_zp_current_zenpage_news, $_zp_current_zenpage_page;;`
You should either be able to add in the global `$_zp_gallery` (and remove the extra semicolon) to get this to work again.
Also, this has been fixed in the trunk, so it should be fixed in the nightlies as well. (see changeset [5773])
Thanks so much for fixing this - really wanted / needed that feature! And BTW it also works with zpGallerific.