TinyPortal

Development => Support => Topic started by: Trashman992 on December 03, 2008, 09:37:44 AM

Title: Error message when trying to post articles.
Post by: Trashman992 on December 03, 2008, 09:37:44 AM
Hi all.

Link to my site: would rather not say.
SMF version: 1.1.7
TP version: 0.9.8
Theme name and version: darkbreak
Mods installed: None
Related Error messages:

Field 'shortname' doesn't have a default value
File: C:\xampp\htdocs\forum\Sources\TPortalAdmin.php
Line: 463

Whenever I try to post an article I get this, it doesn't seem to matter what combinations I try. Everything else in TP seems to work perfectly. I did have trouble with one of the lines in the SMF upgrade script, something to do with smileys and SQL syntax. The suggested remedy was upgrading MYSQL, which I did, and failing that, alter the .sql file slightly, which I also did, and it then worked. I also tried 1.0.5 first, and then uninstalled completely and tried 0.9.8. The database is from an existing forum, upgraded to 1.1.7 recently. I'm new here, but TP looks really cool! I hope I can make it work for our site.

I also hope the above makes some kind of sense  :)
Title: Re: Error message when trying to post articles.
Post by: G6Cad on December 03, 2008, 09:41:24 AM
Let me google that for you! (http://letmegooglethatforyou.com/?q=TP+Field%20'shortname'%20doesn't%20have%20a%20default%20value)
Title: Re: Error message when trying to post articles.
Post by: Trashman992 on December 03, 2008, 11:37:10 AM
I've spent all evening on this so far. It's pretty likely I've tried google.
I'm betting there's something in the results there that I didn't see earlier?
Maybe this one: http://www.tinyportal.net/index.php?action=profile;u=34810;sa=showPosts

For the benefit of anyone who lands in this thread by googling, I got the articles submitting by following what eagle said. I changed
shortname     
sticky    
fileimport
topic    
locked    
illustration
headers

in table _tp_articles from null = not null to null = null. I then had to change
subtype
value7
value8

using PHPMyAdmin. Reason being, after I changed each one, I'd get another error message almost identical to the last, except moving down the fields in the table. Once I had done this, I was able to create articles, as long as they had a category attached. If they had no catagory selected, I'd get:

Incorrect integer value: '' for column 'category' at row 1
File: C:\xampp\htdocs\forum\Sources\TPortalAdmin.php
Line: 463


Presumably it was trying to tell me that I can't set the catagory to null because null is not an integer. I'm guessing I have to write some PHP that says

If $artc = null
$artc = 0


and place it just before line 462. Which is what I *think* eagle was saying in his post. I don't know any PHP, so I guess I'm stuffed.
How'd I do?