View Full Version : Upgrade to 7, sort per page not working
December 14th, 2009, 09:22 PM
I upgraded to 7 this morning and everything went smoothly...or so I thought LOL the option to sort per page is not working correctly, if you click here: Older Kits - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/g549-older-kits) and go down to the Display Options, both sorting the amount of images per page and the quick jump lead to the same place (the chosen gallery) rather than the Sort Now actually sorting the images.
I also have noticed the quick jump only has two options in there no matter which category you are in...strangely enough if you leave the drop down on any of the image amount numbers that's how many show when you go into each category...anyone know how I can fix it so it works properly?
I'm also getting the following warning on the member galleries page and I am sure they were working after the upgrade, so it must have been something I have done since...I have made many customisations to my gallery lol and don't even know where to start looking....
Warning: Division by zero in /home/lissae/public_html/gallery/pp-inc.php on line 2005
December 14th, 2009, 10:11 PM
Just to tack on...I have tried uploading fresh unchanged template files as well as one by one undoing the changes I made to other files...and so far no dice on fixing this lol
Line 2005 in pp-inc is:
$pages = ($rowcnt/$pageper);
And searches on this error through the forums lead me to look in admin for blank rows or rows where there needed to be a number and nothing there either lol so I am stumped, I think both errors are related, I just don't know how to fix it :|
Ok...seems the division by zero error is doesn't appear at first, I don't see it at all as a guest going to member gallery first, then it shows up after I try to sort the images and go back to members gallery
December 15th, 2009, 06:36 AM
Interesting why do none of your urls have the .html on the end? Your script does not look like a default photopost
Signatures And Tags - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/g547-signatures-and-tags)
Now if I set a perpage and hit submit it works for me
December 15th, 2009, 02:21 PM
I removed the .html in all the places in pp-inc.php, I don't like having the .html on the end lol and I did say in my first post I'd made many customisations, I haven't touched the area the sorter and quick jump are in though
Specific steps for me are....I try to sort per page (Signatures and Tags it works, other categories it doesn't) the quick jump no matter where you are ONLY contains Other Galleries and Signatures and Tags and once you hit sort per, the members gallery disappears with the division by zero error
If I delete the cookie ppperpage the members gallery goes back to normal, even there though I think that something is supposed to appear in the thin purple strip under the member gallery list,and the other issues still remain
So far I have reverted to all the original templates, also reverted all my changes and so far nothing lol
December 15th, 2009, 02:36 PM
Last night I loaded my 6.23 database and files into a test installation with no customisation to the files (quick jump and sort worked fine), I just ran the upgrade script (just got up here in Aus lol) and overwrote all the files with all the clean 7 copies (no changes) and it's still doing the same thing, I'm happy to provide details in PM if you want to take a closer look....I'm also happy to pay to fix this lol
December 15th, 2009, 03:24 PM
Well I really cant provide official support till there is default code on the site. There is no telling if any changes made are affecting anything. I think you can understand that. vbulletin would tell you the same thing.
I can tell you if I visit a gallery on your site like I just did and change the perpage box at the bottom and hit submit the perpage is changed this is the url I get
Signatures And Tags - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/showgallery.php?sortby=f&sorttime=9999&way=asc&thumbsonly=0&perpage=45&page=1&cat=547&ppuser=&thumbcheck=0&cat=547)
Please explain how it is not working?
The cookie is now set to 45 pictures a page and I go to the only other category on your site that has an abundance of images and it is viewing at 45 images per page
Older Kits - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/g549-older-kits)
There is only 2 categories on your site that have over 12 images so I can only test with those two. ;)
December 15th, 2009, 03:53 PM
Did you go to the member's gallery after you changed the sorter....and see the error there?
Did you see that the quick jump drop down only contains 2 categories no matter which category you are in?
If you delete the ppperpage cookie the Member Galleries 'Division by 0' error goes away...till next time you use the sorter, if you try to change the number of images showing in the Older Kits section you get a URL that looks like this:
You get the exact same url by using the quick jump in that category, and in fact the category id on the end of the url is the Other Galleries category ID, not the Older Kits gallery **edit, I see it has both cat id's in there now...
Here is the new installation I made that is all completely default files, I overwrote everything with the entire PP7 package...same issue is happening, I really don't know how I can explain it any clearer :(
It's password protected
December 15th, 2009, 04:22 PM
The members gallery is a different script than what your initially talking about here as you where referring to viewing categories or showgallery.php
please explain the exact url your getting an error on as I have viewed your site members gallery categories I am not seeing any errors so I need explicit steps
The categories dropdown cat list I will investigate and see if I can replicate that
December 15th, 2009, 04:41 PM
Ok, I will see if I can put this down coherently LOL
* First of all, before you try the sorter and get any error at all, the member galleries page contains some missing output (see the first member gallery screenshot, that thin purple strip at the bottom contains this code in the template:
But there is no output on the actual page
* Now, if you use the sorter in any category at all then go to visit the member's page the division by 0 error comes up as in the second member galleries screenshot.
Line 2005 in pp-inc.php:
$pages = ($rowcnt/$pageper);
* if you use the sorter in the Signatures and Tags category, it sorts normally, both the cat numbers are the same in the url
but then the member galleries error comes up when you go there
* if you use the sorter in the Older Kits category you get the page seen in the third screenshot, which is also missing some output I can see in the template:
<td width="25%" align="left">$pageind</td>
<td width="75%" align="right">$posternav</td>
And the 2 separate cat id's in the url are different, one pointing to the Older Kits category, and one pointing to the Other Galleries indicated in the quick jump box
When I delete the cookie ppperpage the member galleries go back to the almost normal page shown in the screenshot that is missing the output info
This is exactly the same on both my default install and my live one....and I have not the slightest clue how to fix it LOL
December 15th, 2009, 05:01 PM
Chuck, I am not sure if this is relevant to my issue or not but I was just looking through the thread underneath mine here (http://www.photopost.com/forum/photopost-pro-installation-upgrades/141368-after-upgrade-version-7-search-page-not-listing-categories.html) and realise I have the same issue as that poster on my search page lol none of the changes you gave there worked on mine either...
December 15th, 2009, 05:53 PM
Yes the cat drop down issue I said I was looking at
I hear what your saying about some division by zero error but I cant get it on your site so maybe it was just because I am not logged in so I tried my site. I see no errors.
That would appear to me maybe a setting you have that is set to 0 that should be 1 or more in admin settings is where I would look
December 15th, 2009, 06:41 PM
Hmm, I'm getting the issue whether I am logged in or not logged in, on both Firefox and IE...I might try clearing all my cookies and cache for both and see what happens....as far as the division error, I searched and found the same answer you just gave me but can find nothing in admin that's set to 0 when it shouldn't be
I'll get back to you after I have cleared everything and let you know :)
December 15th, 2009, 06:46 PM
Its got to be a setting
I mean if not then the error would be visible to everyone and on every last site using pp 7
December 15th, 2009, 06:54 PM
Well the interesting thing is that the division error is not happening in Safari, even after clearing all cache and cookies everything I described is still happening in Firefox and IE, I decided to check Safari as well since I hadn't checked in that before lol
I have gone through admin about 10 times now and there is not a single setting there on 0 that doesn't say you can use 0 to disable...so I dunno...it's just looking like I will have to go back to 6.23 from here since it apparently can't be resolved, but I really like the seo urls feature of 7 lol
*edit, I just realised my Safari is set to block cookies, once I enabled them the division error happened there too....could this be a cookie issue?
December 15th, 2009, 07:04 PM
what is the exact url of a page that has a division by 0 error
I have all browsers but use mozilla almost exclusively and I have yet to see an error on your site other than the cat dropdown which has already been reported and we are looking at
December 15th, 2009, 07:13 PM
Member Galleries - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/s500-member-galleries)
That's the url....to note the division error *only* shows up if you have used the image amount sorter, once that cookie is deleted the page goes back to normal, and I have just noticed the per page drop down at the top, when the page is normal shows 12 with the other amounts in the drop down...when the division error appears that drop down show 0 with the rest of the numbers in the drop down....if that makes sense and helps at all lol
December 15th, 2009, 07:19 PM
I can give you the admin login if you want to poke around, I can't PM it to you though apparently LOL
December 15th, 2009, 07:37 PM
The dropdown box replace in showgallery.php
$catoptions = quickcats(0,1,$cat);
December 15th, 2009, 07:47 PM
Awesome, that worked to show all the categories, thank you! However now when I click the sort per it goes straight to Member Galleries - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/showmembers.php) with again the division error lol it seems to me that when you click on Sort now it is going to whatever category is displayed in the drop down....shouldn't they be separate? Or do I need to select the current category in the drop down to sort as well?
December 15th, 2009, 07:47 PM
HMM thanks for the url
Members Galleries - ReefTalk Gallery (http://www.reeftalk.com/gallery/s500-member-galleries.html)
No error on my site
Member Galleries - LissaE Designz Gallery (http://www.lissaedesignz.com/gallery/s500-member-galleries.html)
Most definately on your site I see it on that one url but nowhere else
well looking at the error what is your number of thumbnail columns set to under admin => showgallery options?
December 15th, 2009, 07:56 PM
Number of columns is set to 4, rows to 3...now I could be wrong, been known to be many times before LOL but from what I can tell now that the cat drop down is fixed...if you select the current category you are in it sorts the images to the correct amount of images and you are in that category...you select any other category from the drop down it takes you there instead, once you go to the member gallery page (or are taken there by the drop down), it's almost as if the cookie has been set specifically for the category you were just in and the error pops up because of that or maybe because there are only two galleries there....not too sure but thinking out loud here lol
December 15th, 2009, 08:16 PM
Chuck, I just went to your site...changed the images in the sorter, and then went to members gallery and got the same thing on yours, it did not display the division error, but the drop down was the same with 0 and no member albums showing....see screenshot
I noted that your drop down box for the categories was blank, nothing listed either
December 15th, 2009, 08:45 PM
Members Galleries - ReefTalk Gallery (http://www.reeftalk.com/gallery/s500-membersgalleries.html)
well what is the url you get to? remember all ours should have a category id
December 15th, 2009, 08:51 PM
Ok, I got that by following the same steps that bring the error on my site...go to one of the other categories and change the amount of images that display, then go to the member galleries and that's how it showed up for me...I did this with 2 of your other categories (deleting the ppperpage cookie inbetween) and had the same result on the member galleries...is it possible there is a bug in how the cookie stores info? Cos if cookies are blocked it doesn't happen at all lol
December 15th, 2009, 09:01 PM
all I can tell you at this point is its being looked at the cat dropdown box that is
I am still trying to figure out how your getting a division by zero still cant replicate that in any manner
December 15th, 2009, 09:10 PM
I replicated it on your site Chuck and posted the screenshot, the only difference was it didn't actually display the division by zero text that mine displays, everything else replicated exactly though...I don't understand how I can see the same thing on both my site and yours but it can't be replicated by anyone else lol I really appreciate you looking into it though :)
December 15th, 2009, 09:17 PM
I am referring to the division by zero error that no one can get but on your site.
at any rate like I said the dropdowns perpage is being looked at and we will let you know.
December 15th, 2009, 09:52 PM
Oh ok LOL sorry, and thanx :)
December 15th, 2009, 09:55 PM
By the way, that code you gave me way up there to fix the category jump menu also worked to fix search.php when I changed the code there as well
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.