Pages (2): 1 2   
Member
Member
bic   28-04-2009, 11:45
#1

Hi all!
Using print_album_menu plugin I've noticed a strange behavior:
If you jump from a dynamic album to a static one, and then you choose an image included in the dynamic album too, ZP goes in ZP_SEARCH_LINKED context while showing the image.
Then you'll browse a wrong album (with the dynamic album name in the Breadcrumb instead of the static one too).

Latest version of zenphoto (Nightly Build 20/04/2009) with zenpage default theme.

Member
Member
bic   28-04-2009, 14:10
#2

edit:
I have the same issue whenever i switch between search results and a static album directly (using album menu) without passing across gallery index.
It appends that the cookie zenphoto_image_search_params is still present in such a case.
May be this could cause the problem?
If the first image i choose in the static albun in not in the search results, I can browse the album till I find an image that is part of the results. Then the context switches to ZP_SEARCH_LINKED and I fall browsing the results...

Member
Member
sbillard   28-04-2009, 17:04
#3

I think I see what is happening here. Try tonight's build [3839] and see if that fixes it.

Member
Member
bic   28-04-2009, 19:40
#4

Ok, installed the 3839 SVN zp-core (but 3836 is reported in admin panel).

It solved my issue, and works ok with dynamic albums but, after a normal search, the image.php page in not anymore in ZP_SEARCH_LINKED context, infact get_context()=7 , so that you can't browse the resulting image pages

Another little issue, already present in previous build, is that if while browsing the image.php pages generated by a dynamic album you click a link in the Breadcrumb and then go back in browser the context is loosed again and you fall in a static album. I suppose that nothing can be done about it.

Member
Member
bic   28-04-2009, 23:24
#5

I made further investigations.
You added this line in functions.php
line 1220 zp_setcookie("zenphoto_image_search_params", "", time()-368000, $cookiepath);
to delete the search cookie.
This way the cookie is deleted if not in ZP_SEARCH_LINKED context.
The problem is that when search result are displayed as thumbs the context is ZP_SEARCH if I'm not wrong.
I've put the deletion under the condition: if (in_context(ZP_ALBUM |ZP_IMAGE)) so that the cookie is not deleted when search results are displayed.
It seems to work ATM, I don't know if it's clean, I'm absolute beginner.

Member
Member
sbillard   29-04-2009, 00:35
#6

That code seems to make no difference to me. The problem I am seeing is that the image album name is not in the breadcrumbs. That, I believe, is a different issue.

Member
Member
bic   29-04-2009, 08:20
#7

That's strange, i do have the image name in the breadcrumbs, and now it works as it should.
My 1220 line is: if (in_context(ZP_ALBUM |ZP_IMAGE)){zp_setcookie("zenphoto_image_search_params", "", time()-368000, $cookiepath);}

if i remove the ZP_ALBUM |ZP_IMAGE condition I can't browse the image search results

Member
Member
sbillard   29-04-2009, 23:20
#8

Can you walk me through just what is not working when you say you can't browse the image search resluts? I am not seeing any problems. In addition. If we get to the place where the cookie is reset we are not in a search context and the search engine is set to NULL, so there should be nothing to be remembered.

Member
Member
bic   30-04-2009, 08:07
#9

search engine is set to NULL, so there should be nothing to be remembered.

Yes, may be that's why it needs the cookie to browse the searched images pages.

Can you walk me through just what is not working when you say you can't browse the image search resluts?

This is a search results page:
Search Results

Now after your 1220 line for cookie removal if you click on a thumb, let's say the first one:
Browse 1

Before adding the new 1220 line or whit the ZP_ALBUM |ZP_IMAGE condition added:
Browse 2

In the pictures I posted you can only see the difference in the breadcrumb (and in the prev button present only in the first case) but if you continue browsing using the next button you'll see that in the first case you are in the Portfolio album (18 images), in the second case you are browsing the search results (4 images).

Member
Member
sbillard   30-04-2009, 15:35
#10

This seems to happen only on the zenphoto default theme. I will look into it and see what is going on. (Thanks for the pictures!)

Member
Member
sbillard   30-04-2009, 21:07
#11

Found the problem--a bug in the default and zenpage-default theme. Fixed in [3850] or you can delete the line in search.php that loads the prototype.js script (It does not exist!)

Member
Member
bic   01-05-2009, 08:15
#12

Great, thanks!
This world of coding is a real a mistery!!!

Member
Member
bic   15-05-2009, 21:41
#13

I resume this topic to have your attention on another problem, probably due to the same cookie:
zenphoto_image_search_params
It appens with zenpage default theme.
When in Gallery archive, if you follow a month link (like 2009 > April) all the dynamic albums displayed by Print Album Menu show the same number of image beside the name of each album, that is the number given by the date's search results.

Member
Member
sbillard   15-05-2009, 22:22
#14

So, have you installed the nightly build?

The original problem was caused by "silent" 404 errors. The fix in the nightly build is to avoid clearing the cookie under that circumstance.

Member
Member
bic   16-05-2009, 07:38
#15

Yes, latest nightly build has the same problem.
I didn't notice it before but this behavior also affects the "News archive" month links. In this case the number displayed beside names of dynamic album is zero (nothing displayed actually).
So, is there something wrong everytime we have a DATE in the search cookie?

Member
Member
bic   16-05-2009, 09:40
#16

Well, I realized that there is not a cookie involved in the second case (NEWS Archive month link). The only thing it has in common with the former case (GALLERY Archive month link)is the word DATE in the REQUEST_URI...

Member
Member
bic   16-05-2009, 10:38
#17

print_album_menu line 137:
topalbum = new Album($_zp_gallery,$album,true);
For one of those misterious reasons that make this world of software so fascinating, when &date is in QUERY_STRING topalbum is populated with the images (if any) present in the search for date results. This happens only if $album is a dynamic folder.
Try it to believe!

Member
Member
sbillard   16-05-2009, 19:53
#18

Well, date is a valid search option, so that might explain things. Where did the &date come from?

Member
Member
bic   16-05-2009, 21:11
#19

In the query string:
../index.php?p=search&date=2009-04
or
../index.php?p=news&date=2009-05

Member
Member
sbillard   16-05-2009, 21:50
#20

Yes.

Dynamic albums use the search engine. Archive pages use the search engine. There is only one search remembered.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.