PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Installation & Upgrades (http://www.photopost.com/forum/photopost-pro-installation-upgrades/)
-   -   Cannot create a new category (http://www.photopost.com/forum/photopost-pro-installation-upgrades/140306-cannot-create-new-category.html)

jimjam June 16th, 2009 11:59 AM

Cannot create a new category
 
When I try to create a new category I get this error

Error adding new category to the "database." Returned id was "0."

Thanks

Chuck S June 16th, 2009 12:22 PM

Please in admin => global options set your debug setting to display errors and then try again and post the real mysql error so we may assist.

jimjam June 17th, 2009 03:00 AM

Quote:

Originally Posted by Chuck S (Post 1248807)
Please in admin => global options set your debug setting to display errors and then try again and post the real mysql error so we may assist.


After doing the above the error reads

We're sorry, but the system experienced an unrecoverable error. Please try again later.

Script: adm-cats

Query: INSERT INTO pp_categories (id,catname,description,catorder,thumbs,parent,header,footer,headtags,password,ugnoview,ugnoupload,ugnopost,ugnoanno,ugnovote,watermark,sortorder,frames,maximages,ratingtype,ismember) VALUES(NULL,'Newbury','','3','yes',584,'','','','', '', '1,3,4,8,9,10,11,13', '1,2,3,4,5,7,8,9,10,11,13,14', '1,2,3,4,5,6,7,8,9,10,11,13,14', '2', '2', '0', '0', '', '', '')

Result: Incorrect integer value: '' for column 'maximages' at row 1

Database handle: Resource id #20

Chuck S June 17th, 2009 07:59 AM

In Layman's terms MySQL in strict mode can not allow query inserts with null values to be entered.

Workaround

There are several workarounds

1. Replace in my.ini the current sql-mode line with sql-mode="MYSQL40"
2. Start MySQL with the option --sql-mode="MYSQL40"
3. Execute the query SET GLOBAL sql_mode='MYSQL40'

MySQL needs to be restarted before changes in my.ini have an effect. My.ini can be found in the MySQL installation directory or the Windows directory, depending on your configuration.

jimjam June 17th, 2009 12:45 PM

Thanks Chuck, I have found the line

Quote:

# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
What are the implications, if any for changing from what it is currently to MYSQL40

Thanks

Chuck S June 17th, 2009 12:48 PM

There should none most servers run in compatiblity mode and not strict mode.

You can also try just removing this and remember to restart the server

STRICT_TRANS_TABLES


All times are GMT -5. The time now is 08:54 PM.

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