Show Photo - mysql error displayed
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!
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. ;)
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.
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.
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!
There you go that explains it another nerd. ;)
Yeah the vast majority of our customers do not have such skills.
Guilty as charged...
Yeah, the majority of my customers do not either...
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