1
bobwva
SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 3:08

  • bobwva

  • Friend of XOOPS

  • Posts: 17

  • Since: 2007/4/1 1


prior to upgrade from 2.0.16, SmartFAQ worked fine, after upgrade and updates, I cannot add a category to SmartFAQ and instead get the following error - and there seems to be nothing in the help/support forums on this site or on the SmartFactory website:

INSERT INTO smartfaq_categories (categoryid, parentid, name, description, total, weight, created) VALUES (NULL, 0, 'Uncategorized', 'Questions and FAQs that are uncategorized - as the number of questions grows, we will create categories as appropriate', 1, 1, 1247108461)
Error number: 1048
Error message: Column 'categoryid' cannot be null

server config is as follows:
XOOPS Version - XOOPS 2.3.3
PHP Version - 5.2.5
MySQL Version - 5.0.51a
Server API Version - apache2handler
OS Version - FreeBSD

safe_mode - Off
register_globals - Off
magic_quotes_gpc - Off
allow_url_fopen - On
fsockopen - On
allow_call_time_pass_reference - Off
post_max_size - 12M
max_input_time - 60
output_buffering - 4096
max_execution_time - 30
memory_limit - 24M
file_uploads - On
upload_max_filesize - 4M

Loaded PHP extensions «

* session
* Reflection
* date
* libxml
* apache2handler
* pcre
* standard
* ctype
* gd
* mcrypt
* mhash
* mysql
* openssl
* xml
* Zend Optimizer



2
ghia
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 6:33

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Did you upgrade only XOOPS or did you change also other things?
You did add categories before?

3
culex
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 9:12

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


Smartfaq reports that they updated the latest smartfaq to even out some problemes with php5.

Which version of smartfaq is yours ?
Programming is like sex:
One mistake and you have to support it for the rest of your life.

4
bobwva
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 14:28

  • bobwva

  • Friend of XOOPS

  • Posts: 17

  • Since: 2007/4/1 1


The version is the SmartFAQ 1.08 Final - I downloaded this from their website directly and did a complete uninstall/reinstall (and also cleared all the caches)

There were no categories before.

5
culex
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 17:39

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


yes I see. In the MySQL file I see there are written

# Table structure for table `smartfaq_categories`
.....
`categoryid` int(11) NOT NULL auto_increment,
.....

So aparently this setting is set not to accept NULL at all, but give automatic id.

I dont know why your script tries to give null to id but I'll try to find out
Programming is like sex:
One mistake and you have to support it for the rest of your life.

6
ghia
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2009/7/9 18:18

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Maybe you can change the query to
INSERT INTO smartfaq_categories (categoryidparentidnamedescriptiontotalweightcreatedVALUES (00'Uncategorized''Questions and FAQs that are uncategorized - as the number of questions grows, we will create categories as appropriate'111247108461)
or
INSERT INTO smartfaq_categories parentidnamedescriptiontotalweightcreatedVALUES 0'Uncategorized''Questions and FAQs that are uncategorized - as the number of questions grows, we will create categories as appropriate'111247108461)
Anyway, you need to find out where the query is done in the source and adapt it there.
Other possibility might be to drop the 'not null' clause in the sql file (at reinstall of the module) or change the attribute of the field with phpMyAdmin.

7
bobwva
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2010/5/22 17:34

  • bobwva

  • Friend of XOOPS

  • Posts: 17

  • Since: 2007/4/1 1


The problem persist, but, as it has bugged me for a while, I have at least figured out how to fix it - problem may not be with the module, but somewhere else, since the

SQL file indicates, as noted by a reply above:
NOT NULL auto_increment,


but when I install the module, what gets written into the database is
NOT NULL default '0',

The solution, at least for me (and which I'm posting as it might help others), is that I download the database, manually edit the line to correct it, then restore the corrected database - it seems to work fine and the database seems to remain correct thereafter.

Not sure why this happens, that's the next problem to figure out - could be my server/php, could be some other module, but at least it seems to be fixable on a case by case basis.

8
chefry
Re: SmartFAQ 1.08 Final problem under Xoops 2.3
  • 2010/5/25 9:28

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Does anyone know how I can create tables in SmartFAQ?

The inability to create tables seems to be a problem in all Smartfactory stuff. You can't do it in SmartSection either

Login

Who's Online

194 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 194


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits