View Full Version : Sort Order Error
April 30th, 2012, 09:43 AM
Trying to sort photos I get the error messages:
At the top of the page:
Warning: Division by zero in /home/gmcmhpho/public_html/photos/pp-inc.php on line 2054
And below the Album Name Box:
Warning: Invalid argument supplied for foreach() in /home/gmcmhpho/public_html/photos/templates/gallery/orderphotos.tmpl on line 36
Is this a known bug or am I doing something wrong?
It worked fine before the upgrade.
April 30th, 2012, 11:19 AM
division by 0 usually means you have a setting in admin for rows set to 0
I tested sorting photos on an admin editor and things work on my site. You can try here on this site as well.
Maybe upload all files templates delete cookies and check your admin settings and try again.
May 1st, 2012, 11:41 AM
You updated my site so I don't think I have the correct files available on my home system.
Same result with a virgin browser devoid of cookies.
Cannot find a setting in Admin that pertains to rows set to 0.
User received the error first and brought it to my attention and I get the same result.
Tried setting all photos in numerical order starting with 11 rather than 01 in case that was the problem to no avail.
Clarification: I am referring to the sort photo function available only to an album owner or administrator where he can choose the order in which they are presented.
May 1st, 2012, 11:50 AM
Yes I know what your talking about I am saying is I have tested sort photos multiple sites and see no issue.
You can send site info to the contact us link in our header if you want us to look. I do not know what you mean by files on your home system.
May 1st, 2012, 12:49 PM
By home system, I mean the files that I upload to the site from here. Since you did the upgrade, I didn't actually have any of the new files.
I downloaded all directories from the site yesterday and overwrote my existing files, added the new ones, deleted local ones that no longer existed on the web server. Since they came from the site, don't think it'd do any good to re-upload them again.
Not sure about how to proceed with files in the root since I know some are customized and I can't remember which ones. ...
May 1st, 2012, 01:48 PM
well if we upgraded your site then nothing would be customized so if you customized something after we did the upgrade that could be causing your issue.
I guess I will wait for site info to comment further.
May 1st, 2012, 02:06 PM
I haven't customized anything since the upgrade and haven't for years.
I sent the credentials via your personal email at verizon.
May 1st, 2012, 04:48 PM
Yes and I commented. I see no division by zero error anywhere and I have viewed many of your personal albums. You can see by the url I provided you I am in the right place.
The one true error found about the sort order not sticking I gave you a change to try.
May 2nd, 2012, 10:19 AM
As no changes were made, do you have an explanation for why the "division by 0" in pp-inc.php and the "Invalid argument" in orderphotos.tmpl errors went away?
To try to make my sort order stick, I tried your suggested change on line 24 of misc.php to no avail.
Even though I'm no longer getting the error messages when trying to sort photos, I still need the sort function to work. Do you have any other suggestions?
May 2nd, 2012, 10:57 AM
I can not say about your division by 0 other than I already responded maybe you had a setting for the number of rows to 0.
As far as your issue with sort order maybe try this template.
May 2nd, 2012, 11:45 AM
Didn't help. No change.
Any other ideas to try?
May 2nd, 2012, 06:25 PM
You sure you actually uploaded it to the proper template set?
May 2nd, 2012, 06:27 PM
I just tested your site it works fine if you input a sort it sticks
May 3rd, 2012, 09:06 AM
Crap! I guess it takes a period of time before the change takes place as I tried it to no avail right after I uploaded the new file.
Oh well, alls well that ends well, I suppose.
Thanks for your help Chuck.
May 3rd, 2012, 11:29 AM
Not a problem
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.