PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Bug Reports (http://www.photopost.com/forum/photopost-pro-bug-reports/)
-   -   Show Photo - mysql error displayed (http://www.photopost.com/forum/photopost-pro-bug-reports/148803-show-photo-mysql-error-displayed.html)

swtadm October 1st, 2012 06:15 AM

Show Photo - mysql error displayed
 
Hi Chuck,

In one of my photopost installations, when a visitor goes to the Show Photo page a mysql error gets displayed at the top of the page.

The error is:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in [path]/photopost/forums/vb3.php on line 200

I debugged the vb3.php script and found that that it was not finding the table column, uf.field2 in the select statement on line 175. I looked at the userfields table and it holds my custom profile fields. When I set up the custom profile for this site, I must have deleted that field and my starting column is field5. I've changed the code for in the select statement to uf.field5 and it removed the error.

I decided to add a field2 to the db table and put the select statement back to it's original state. It doesn't mess up my custom profile so all is good.

This is just to let you know that this field can be deleted by users when creating a new, custom profile so it's probably worth considering how you want this select code to be written in the future!

Cheers,

Dennis

Chuck S October 1st, 2012 08:36 AM

Dennis

We are fully aware you can delete profile fields we have no control over that aspect of things that is your forum. Now when coding an integration with a forum product we have to code to the default vbulletin stock core product. Now the function your referring to is the get_profiledata so we try and grab the info and the location info in a default vb is that field2.

The only way to avoid that issue is to never query or show the user location when we grab user info from the forum.

The issue is well documented here so it is no secret. ;)

swtadm October 1st, 2012 08:47 AM

It's great that you're already aware of it!

I understand that you must program to the default configuration and that my changes caused the defaults to break.

Cheers,

Dennis

Chuck S October 1st, 2012 08:49 AM

not a problem just not much we can do about it. ;) Your actually ahead of lots of people who have posted here. You actually knew what the issue was which means your technically proficient which is nice to see.

swtadm October 1st, 2012 09:10 AM

Thanks Chuck, programming php and mysql ~10 to 12 hours a day, 6 days a week does that. And gives me an appreciation of all the hard work that goes into creating a great product like yours!

:)

Chuck S October 1st, 2012 10:43 AM

There you go that explains it another nerd. ;)

Yeah the vast majority of our customers do not have such skills.

swtadm October 1st, 2012 10:49 AM

Guilty as charged...

Yeah, the majority of my customers do not either...

Dennis

Chuck S October 1st, 2012 12:47 PM

Just the nature of the beast my friend. ;)


All times are GMT -5. The time now is 02:56 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97