What does a faqdata_user or faqdata_group relationship mean?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

What does a faqdata_user or faqdata_group relationship mean?

Post by dajoker »

For example I have a group called 'employees' and all company employees are a member of this group. Most FAQs are publicly-readable which is nice but when I search for the solution_id of a FAQ that is not publicly-readable (faqdata_group refers only to employees) then whether I am doing that search with anonymous/public or with admin (which is not linked with the employees group at all) I get the following at the top of my page and my categories (seventy or so) are spread out really far apart going down the page:

<quote>
phpMyFAQ notice [8]: Undefined index: id in artikel.php on line 60
phpMyFAQ notice [8]: Undefined index: content in artikel.php on line 62
phpMyFAQ notice [8]: Undefined index: id in artikel.php on line 63
phpMyFAQ notice [8]: Undefined index: active in artikel.php on line 181
phpMyFAQ notice [8]: Undefined index: dateEnd in artikel.php on line 224
phpMyFAQ notice [8]: Undefined index: active in artikel.php on line 227
phpMyFAQ notice [8]: Undefined index: solution_id in artikel.php on line 290
phpMyFAQ notice [8]: Undefined index: title in artikel.php on line 298
phpMyFAQ notice [8]: Undefined index: keywords in artikel.php on line 298
phpMyFAQ notice [8]: Undefined index: date in artikel.php on line 300
phpMyFAQ notice [8]: Undefined index: revision_id in artikel.php on line 301
phpMyFAQ notice [8]: Undefined index: author in artikel.php on line 302
</quote>

Is this supposed to happen? What does it mean to have a FAQ linked to users and groups. I presume it just shows which user/group created it which doesn't seem to have much point to me. Maybe it is about rights and what a user/group can see in the first place but that doesn't make much sense to me either.

I've searched the docs, this forum (via Google), and Google generally and have not found the answer. Advice is appreciated.
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by Thorsten »

Hi,

this is a bug.

faqdata_user and faqdata_groups are relation tables for user and group rights.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by dajoker »

Looks like 2.6.5 has fixed it. That's good; thanks.
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by Thorsten »

Hi,

good to know! :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by dajoker »

Um..... I lied. It is still broken in 2.6.5. If I set a faqdata_user relationship (to a FAQ entry) to 1 and then a faqdata_group entry also to '1' (so they are not setup for anonymous at all) and then search by a solution_id I still get the error I mentioned earlier. It seems like that should not be happening.
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by Thorsten »

Hi,

okay, I will check this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by dajoker »

Had to get this resolved for a demo. My "fix" is a hack and should probably be done the right way whatever that is. Interested in what that would be, by the way.

<quote file='./phpmyfaq/artikel.php' version='2.6.5'>
56a58,59
< $faq->getRecordBySolutionId($solution_id);
---
> $faq->getRecordBySolutionId($solution_id);
> if (sizeof($faq->faqRecord) == 0) { header('Location: http://mybox0.goes.here/phpmyfaq?search ... rch');exit;}
</quote>

Basically if the returned $faq->faqRecord array has zero elements then the next line is going to bomb out so let's just send the user back to the search page so it looks like their search was invalid.

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

Re: What does a faqdata_user or faqdata_group relationship mean?

Post by Thorsten »

Hi,

the fix in the current 2.6 branch for the 2.6.6 release should already fix this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply