FAQ (Frequently Asked Questions) mod

Started by Suki, June 20, 2011, 08:19:18 PM

Previous topic - Next topic

Chalky

I've just updated to the latest version.  Thanks Suki, I do like this mod  :)

DSystem

Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:

Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190

I'll be very grateful if you have any solution

Thank you.

awolexpat

I am using the latest version of SMF and had a version of this mod previously installed in June of last year - sorry don't know the version number.

I am getting the same error as an earlier poster after uninstalling the old version and installing the new, as follows:
Unknown column 'c.category_log' in 'field list'
File: /home3/awolonl1/public_html/forum/Sources/Subs-Faq.php
Line: 279

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.4 while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.


It installs without errors but this message appears when clicking on the FAQ link. I have not tried the database upgrade solution yet as I saw the previous poster who had the same issue; I also don't know where I can find the latest version of upgrade.php. Is this the complete forum package? I don't really understand why my database would not have been upgraded when i went to 2.0.4.

I also tried uninstalling and then installing from the Github repository (as argued at length on here) but whether with a zipped set or files uploaded to the Packages my SMF won't allow me to - with the zipped package it tells me there is nothing there and with the unzipped files it doesn't see the package at all to allow me to install. There are no installation instructions on Github either as far as I can tell.

With the previous poster you asked them to attach a file but there was nothing more since, so would it be possible to put what code changes are required on here? I have looked at the line the error is meant to have occurred on but of course the error is somewhere before that.

Kindred

don't worry about that message....   it's a generic and incorrect message that has nothing to do with your issue
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

awolexpat

OK, thanks Kindred I figured it might be. If anyone knows how to resolve the issue then I would be very grateful.

jsx

Quote from: DSystem on April 28, 2013, 07:01:25 PM
Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:

Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190

I'll be very grateful if you have any solution

Thank you.

I get the same error. How to fix it?

Bobby

#386
Quote from: jsx on March 09, 2020, 02:55:53 PM
Quote from: DSystem on April 28, 2013, 07:01:25 PM
Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:

Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190

I'll be very grateful if you have any solution

Thank you.

I get the same error. How to fix it?

This error might cause by the database. Go to your phpmyadmin and try to run these SQL statements:


--
-- Table structure for table `smf_faq`
--
DROP TABLE IF EXISTS `smf_faq`;
CREATE TABLE `smf_faq` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(5) NOT NULL,
  `log` text NOT NULL,
  `title` varchar(255) NOT NULL DEFAULT '',
  `body` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `smf_faq`
--

INSERT INTO `smf_faq` (`id`, `cat_id`, `log`, `title`, `body`) VALUES
(1, 1, 'a:1:{i:0;a:2:{s:4:\"user\";i:1;s:4:\"time\";i:1584116938;}}', 'Your FAQ question 1', 'This is your answer 1  ;)'),
(2, 1, 'a:1:{i:0;a:2:{s:4:\"user\";i:1;s:4:\"time\";i:1584116972;}}', 'Your FAQ question 2', 'This is your answer 2  :)');

-- --------------------------------------------------------

--
-- Table structure for table `smf_faq_categories`
--
DROP TABLE IF EXISTS `smf_faq_categories`;
CREATE TABLE `smf_faq_categories` (
  `category_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) NOT NULL DEFAULT '',
  `category_last_user` int(11) DEFAULT NULL,
  `category_log` int(10) NOT NULL DEFAULT 0,
  PRIMARY KEY (`category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `smf_faq_categories`
--

INSERT INTO `smf_faq_categories` (`category_id`, `category_name`, `category_last_user`, `category_log`) VALUES
(1, 'General', 1, '0');


--
-- Dumping data for table `smf_settings`
--
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_settings_enable';
UPDATE `smf_settings` SET `value` = '5' WHERE `smf_settings`.`variable` = 'faqmod_num_faqs';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_show_catlist';
UPDATE `smf_settings` SET `value` = '3' WHERE `smf_settings`.`variable` = 'faqmod_show_latest';
UPDATE `smf_settings` SET `value` = 'id' WHERE `smf_settings`.`variable` = 'faqmod_sort_method';
UPDATE `smf_settings` SET `value` = 'home' WHERE `smf_settings`.`variable` = 'faqmod_menu_position';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_use_javascript';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_care';


Note: change all values "smf_" prefix with your own {database_prefix}

Kindred

Heya Suki,

Installing on 2.1 I get the following error

BLOB, TEXT, GEOMETRY or JSON column 'log' can't have a default value
File: .../Packages/temp/database.php
Line: 165
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

I commited a few fixes to the 2.0 branch: https://github.com/MissAllSunday/faq/tree/2.0

Can you test it out to see if there isn't any more errors before releasing a new version?

direct download: https://github.com/MissAllSunday/faq/archive/2.0.zip  Its double-foldered so unzip and re-zipjust the needed folders and files
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Speed King

Just installed FAQ mod version 2.0 on my SMF 2.1 RC3 test forum, running on PHP 8.0
It seems that mod is working properly, I have tested creating of new categories and new FAQs. New FAQs are saved successfully, editing of existing FAQs too.

I think that drop-down menu in admin panel for position of the FAQ mod button in the main forum menu next to... (Home, Help, Search, Login, Sign Up) needs to be edited, because in SMF 2.1 'Help' and 'Login' buttons do not exist.

Suki

Cool, good to know an almost 10 years old codebase still holds up.

Yeah the button position didn't aged well, will see what I can do to release a patch for it.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: