Trying to upgrade - what is faqsection_group?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Trying to upgrade - what is faqsection_group?

Post by R0CKY »

I had a very old version of phpmyfaq with no easy upgrade route, so I installed the latest version and imported all the data table by table from the old sql database.

Everything went well but for two issues :

1. In Admin area : Although I can find the new FAQs in the new system by using the "search" option, if I use the Edit Faqs option which should list all the FAQs, I get a blank page.
2. In the front end, although the FAQ titles are listed in the "Latest Faqs" box etc, if you click ona title you get a server 500 error.

So now I am going through each table one by one to see what I am missing.

In the new version there is a table called faqsection_group - this was not in older versions -what does this table contain, can any tell me or describe the contents?

Thanks.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Trying to upgrade - what is faqsection_group?

Post by Thorsten »

Hi,

for the two errors, please enable the debug mode in src/Bootstrap.php and post the errors here.

The section tables are for new feature which is not finished yet: the "large" permission set, where you can define sections with special permissions. It's not done yet and will be finally implemented during the 3.x versions released the next years.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Hi

Here is the error

Code: Select all

Fatal error: Uncaught Exception phpMyFAQ\Exception with message Unknown column 'fd.created' in 'field list' in /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Database/Mysqli.php: 168 Stack trace: #0 /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Faq.php(1581): phpMyFAQ\Database\Mysqli->fetchObject(false) #1 /home/grnet/public_html/faqs-2020/admin/record.show.php(209): phpMyFAQ\Faq->getAllRecords(1, Array, NULL) #2 /home/grnet/public_html/faqs-2020/admin/index.php(288): require('/home/grnet/pub...') #3 {main} thrown in /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Database/Mysqli.php on line 168
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Any idea on how to fix that error?
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Trying to upgrade - what is faqsection_group?

Post by Thorsten »

Hi,

sorry, I see, that you copied just the database.

Please run the the update script located in setup/update.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Thanks.

I ran the update.

Categorie list ok - https://www.ghostrecon.net/faqs-2020/?a ... how&cat=14

But trying to click on a FAQ gives this error message

Fatal error: Uncaught Exception phpMyFAQ\Exception with message Unknown column 'created' in 'field list' in /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Database/Mysqli.php: 168 Stack trace: #0 /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Faq.php(718): phpMyFAQ\Database\Mysqli->fetchObject(false) #1 /home/grnet/public_html/faqs-2020/index.php(315): phpMyFAQ\Faq->getRecord(6) #2 {main} thrown in /home/grnet/public_html/faqs-2020/src/phpMyFAQ/Database/Mysqli.php on line 168
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Trying to upgrade - what is faqsection_group?

Post by Thorsten »

Hi,

please run these queries:

Code: Select all

ALTER TABLE faqdata CHANGE datum updated VARCHAR(15) NOT NULL;
ALTER TABLE faqdata_revisions CHANGE datum updated VARCHAR(15) NOT NULL;
ALTER TABLE faqdata ADD created TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE faqdata_revisions ADD created TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
You can use a tool like phpMyAdmin for that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Thank you, the FAQ is working again!

There are many DEBUG issues listed, but I can work through these myself hopefully.

Thanks again.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Trying to upgrade - what is faqsection_group?

Post by Thorsten »

Hi,

awesome. You can post your errors here, I'll try to fix them asap.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Hi Thorsten

You can see them on my test install at https://www.ghostrecon.net/faqs-2020/

I think maybe because all of the users have been removed and it is only my admin account that exists.
/home/grnet/public_html/faqs-2020/src/Bootstrap.php:
phpMyFAQ\Configuration->getAll() in line 140: SELECT config_name, config_value FROM faqconfig
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/Session.php:
phpMyFAQ\Database\Mysqli->nextId() in line 243: SELECT MAX(sid) AS current_id FROM faqsessions
/home/grnet/public_html/faqs-2020/index.php:
phpMyFAQ\Session->userTracking() in line 235: INSERT INTO faqsessions (sid, user_id, ip, time) VALUES (8, -1, '94.175.155.184', 1605703402)
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/Category.php:
phpMyFAQ\Category->getOrderedCategories() in line 141: SELECT fc.id AS id, fc.lang AS lang, fc.parent_id AS parent_id, fc.name AS name, fc.description AS description, fc.user_id AS user_id, fc.group_id AS group_id, fc.active AS active, fc.image AS image, fc.show_home AS show_home FROM faqcategories fc LEFT JOIN faqcategory_group fg ON fc.id = fg.category_id LEFT JOIN faqcategory_user fu ON fc.id = fu.category_id WHERE ( fg.group_id IN (-1) OR (fu.user_id = -1 AND fg.group_id IN (-1))) AND fc.active = 1 AND fc.lang = 'en' GROUP BY fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id, fc.group_id, fc.active, fc.image, fc.show_home ORDER BY fc.parent_id, fc.id
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/Helper/CategoryHelper.php:
phpMyFAQ\Category\CategoryRelation->getNumberOfFaqsPerCategory() in line 44: SELECT fcr.category_id AS category_id, COUNT(fcr.record_id) AS number FROM faqcategoryrelations fcr, faqdata fd WHERE fcr.record_id = fd.id AND fcr.record_lang = fd.lang GROUP BY fcr.category_id
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/User.php:
phpMyFAQ\User\UserData->get() in line 937: SELECT display_name FROM faquserdata WHERE user_id = 0
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/Helper/CategoryHelper.php:
phpMyFAQ\Category\CategoryRelation->getNumberOfFaqsPerCategory() in line 44: SELECT fcr.category_id AS category_id, COUNT(fcr.record_id) AS number FROM faqcategoryrelations fcr, faqdata fd WHERE fcr.record_id = fd.id AND fcr.record_lang = fd.lang GROUP BY fcr.category_id
/home/grnet/public_html/faqs-2020/src/phpMyFAQ/Tags.php:
phpMyFAQ\Tags->getAllTags() in line 405: SELECT MIN(t.tagging_id) AS tagging_id, t.tagging_name AS tagging_name FROM faqtags t LEFT JOIN faqdata_tags dt ON dt.tagging_id = t.tagging_id LEFT JOIN faqdata d ON d.id = dt.record_id WHERE 1=1 AND d.active = 'yes' GROUP BY tagging_name ORDER BY tagging_name ASC
/home/grnet/public_html/faqs-2020/index.php:
phpMyFAQ\Faq->getRecordsWithoutPagingByCategoryId() in line 675: SELECT fd.id AS id, fd.lang AS lang, fd.thema AS thema, fcr.category_id AS category_id, fv.visits AS visits FROM faqdata fd LEFT JOIN faqcategoryrelations fcr ON fd.id = fcr.record_id AND fd.lang = fcr.record_lang LEFT JOIN faqvisits fv ON fd.id = fv.id AND fv.lang = fd.lang LEFT JOIN faqdata_group fdg ON fd.id = fdg.record_id LEFT JOIN faqdata_user fdu ON fd.id = fdu.record_id WHERE fd.date_start <= '20201118134322' AND fd.date_end >= '20201118134322' AND fd.active = 'yes' AND fcr.category_id = 0 AND fd.lang = 'en' AND fdu.user_id = -1 GROUP BY fd.id,fd.lang,fcr.category_id,fv.visits ORDER BY id DESC
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Trying to upgrade - what is faqsection_group?

Post by Thorsten »

Hi,

if you turn off the debug mode in src/Bootstrap.php, the output will disappear. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
R0CKY
Posts: 62
Joined: Mon May 19, 2008 9:18 pm

Re: Trying to upgrade - what is faqsection_group?

Post by R0CKY »

Thorsten wrote: Wed Nov 18, 2020 4:39 pm Hi,

if you turn off the debug mode in src/Bootstrap.php, the output will disappear. :-)

bye
Thorsten
Ah okay, I thought these were errors I needed to fix :D
Post Reply