![]() |
SQL Error: Unknown column 'notcat' in 'where clause'(FIXED) Hey guys... I've installed a fresh copy of PhotoPost 5.21 on a clean database for a new project, and got the following error while trying to move a category from beneath one parent to under another parent category. Code: Content visible to verified customers only. |
Ok, something just occurred to me within 5 seconds of posting that question which may help out. I believe that this is a bug in the PhotoPost code. 1. If the NEW parent category is set to "Contains Thumbnails? = No" and the category you are moving beneath it is set to "YES" then the error is generated and the category is bumped up as a new top-level category. 2. If you temporarily set the NEW parent category to "Contains Thumbnails? = Yes" you can move the child category beneath it w/o an error being generated. Then you can go back to the new parent category and set "Contains Thumbnails? = No". It seems that there ought to be some logic in the PHP code that lets a child category containing thumbnails to be moved beneath a parent category tha does NOT contain thumbnails. Many of us have our galleries set up like this with empty parent categories for the sole sake of having a hiearchy that looks more like our forums hiearchy. If that makes sense. :) |
well way before we get to any query stuff we kill the process so why not on yours? If I set a category to no thumbs I get a screen that says you cant upload to that category don't you? if ( $category == "notcat" ) { diewell( $Globals['pp_lang']['topcat'] ); } |
I'm not sure if this happens on my installation or not. |
Well try uploading to the category that is marked no thumbs and sees what happens. Your reporting that you get an SQL ERROR and I am saying I get a diewell message and you should as well which kills the page before any queries can run |
Yes, if I try to upload directly to the parent category, then I get the error dialog box that says the category that I have chosen is a top level category. But why would this matter if I was trying to move a child category into that parent category? |
Thanks, Chuck. That seems to have worked perfectly. Is this something that you will talk to Michael about incuding in future releases, or should I be prepared to make similar edits to the code in the future? |
Hello This is a proposed fix that simply replicates the catmoveopt into a mini function in adm-inc.php and we then call admoveopt which does not set catoptions variable with no thumbs to NOTCAT. The main function in pp-inc.php needs this code to function on the front end. It is safe to run this Michael will look over my proposed fix as always and either use it or may find another resolution but no worries the issue will be fixed one way or another. |
Thanks again. |
Actually, all that needs to be done is the line in pp-inc.php at 1705: Code: Content visible to verified customers only. |
Thanks, Michael. I'll give that a shot. |
| All times are GMT -5. The time now is 07:07 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0