Member
Member
NaturalEnquirer   2010-08-22, 12:22
#1

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.

Administrator
Administrator
acrylian   2010-08-22, 13:08
#2

I can reproduce that but have no idea right now. I guess sbillard will have later.

Administrator
Administrator
acrylian   2010-08-22, 18:50
#3

You were surely not using the default theme, but the Zenpage theme as we found the error in the jCarousel- thumb-nav plugin. It will be fixed in tonight's nightly. Please try be more exact with your report in the future.

Member
Member
NaturalEnquirer   2010-08-22, 23:21
#4

I was exact - I did mean that I get this error in the DEFAULT theme, but I did have the zenpage option enabled since I was using that in the zpGallerific theme before switching to default theme to try to see if zpGallerific was causing the issue.

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

Member
Member
sbillard   2010-08-23, 00:54
#5

Well, that is extremely interesting since the error that Acrylian found comes from the jcarousel_thumb_nav plugin which is not used in the default theme.

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.

Member
Member
kagutsuchi   2010-08-23, 01:53
#6

Quote: Backtrace: Bad gallery in instantiation of album flora/all-plants.alb.
Album->Album called
from handleSearchParms (functions.php [978])
from index.php [45]
Saw the website in another post and checked out the debug_log.

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.

Member
Member
NaturalEnquirer   2010-08-23, 01:55
#7

I disabled zenpage plugin and stil get errors.

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.

Member
Member
kagutsuchi   2010-08-23, 01:59
#8

Looks like handleSearchParms() needs this added:

if (!is_object($_zp_gallery)) $_zp_gallery = new Gallery();

Member
Member
NaturalEnquirer   2010-08-23, 12:48
#9

I found the handleSearchParms() in functions.php file, but in which line exactly should if (!is_object($_zp_gallery)) $_zp_gallery = new Gallery(); be added?

Thanks so much for your assistance.

Administrator
Administrator
acrylian   2010-08-23, 13:47
#10

I haven't looked but right at the beginng would be fine as that object is normally always setup automatically.

Member
Member
NaturalEnquirer   2010-08-23, 16:43
#11

I am sorry to trouble you with this but I tried adding if (!is_object($_zp_gallery)) $_zp_gallery = new Gallery(); before the $context line. This generates errors:

`
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');

`

Member
Member
sbillard   2010-08-23, 16:55
#12

Actually, there is no "possibility" for $_zp_gallery not to be set since it is done so by the load of the controller and/or the template-functions script.

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.

Member
Member
sbillard   2010-08-23, 17:46
#13

Your "cannot modify headers..." error indicates a problem with your edit of the above. Possibly your editor has inserted a space at the beginning of the functions.php file? Anyway, that file should start with `

Member
Member
NaturalEnquirer   2010-08-24, 02:52
#14

Ok I need help with this. I made a clean install into a new directory with new database. I ran config and copied some albums to the albums folder. I made no changes to the theme. I searched for a specific tag and created an image with default settings (accepted suggested name and root path) and saved. I go to the dynamic album and can see thumbnails. as soon as I view any of the image details I receive the same erors as before:

`
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.

Member
Member
kagutsuchi   2010-08-24, 03:11
#15

functions.php has a bug on 1.3.1 in which the globals for handleSearchParms() is thus:

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])

Member
Member
NaturalEnquirer   2010-08-24, 04:18
#16

YES! Thank you, thank you! So happy!

Thanks so much for fixing this - really wanted / needed that feature! And BTW it also works with zpGallerific.

Administrator
Administrator
acrylian   2010-08-24, 08:29
#17

Great we finally got it. Strange that no one else noticed this bug...

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.