Tag search not working
Moderator: Thorsten
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Tag search not working
I've installed version 2.6.7 and everything is working very well apart from tagging. I can add tags to FAQs and they appear in the tag cloud but when I click on a word in the tag cloud no search results are displayed - it says 'No FAQs available'.
Is there any specific configuration or setting that I need to set? There's no errors being thrown anywhere else (as far as I can tell) so I'm confused to what the problem could be. Is there a minimum threshold (e.g. number of tags) that needs to be met before the tag search works?
Is there any specific configuration or setting that I need to set? There's no errors being thrown anywhere else (as far as I can tell) so I'm confused to what the problem could be. Is there a minimum threshold (e.g. number of tags) that needs to be met before the tag search works?
Re: Tag search not working
No there isn't anything to configurate. It's simply a bug.daryl.hurst wrote:Is there any specific configuration or setting that I need to set?
Going to line 67 in search.php, there is still a tag-handler building a html-resultset, but the variable $printResult, which is filled with an html-output of the result for that tag-id, isn't used anymore in the rest of the file. Seems the usage of the new class PMF_Helper_Search is the reason for that.
I don't really know what Thorsten wanna do with this new class, maybe it's a wrapper or something like that. So i can't give you a hint to fix this bug.
Regards Ortwin
Man muss nicht alles wissen,
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Re: Tag search not working
Thanks Ortwin for such a quick response!
I'll maybe dig around the code you suggested and see if I can come up with what might be a possible fix.
I'll maybe dig around the code you suggested and see if I can come up with what might be a possible fix.
Re: Tag search not working
Hi daryl,
i have a dirty fix for you. Search for line 167 in search.php
and change it to
This is just "dirty" because tagresults don't use the new helperclass and therefor there is no pagination for the results.
Regards Ortwin
i have a dirty fix for you. Search for line 167 in search.php
Code: Select all
'printResult' => $faqSearchHelper->renderSearchResult($faqSearchResult, $page),
Code: Select all
'printResult' => (!empty($printResult))?$printResult:$faqSearchHelper->renderSearchResult($faqSearchResult, $page),
Regards Ortwin
Man muss nicht alles wissen,
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Re: Tag search not working
Ortwin, just tried your suggestion and it appears to work perfectly!
I take what you're saying regarding the pagination but I can live without that for now. I've only just come across phpMyFAQ but it's an excellent piece of software, I'll continue to try and understand the renderSearchResult class and why this didn't originally work.
Again thank you very much for your assistance, I can't believe I got a solution in the same day!
I take what you're saying regarding the pagination but I can live without that for now. I've only just come across phpMyFAQ but it's an excellent piece of software, I'll continue to try and understand the renderSearchResult class and why this didn't originally work.
Again thank you very much for your assistance, I can't believe I got a solution in the same day!
Re: Tag search not working
Hi daryl,
your welcome.
I'm glad if I could help you
Regards Ortwin
your welcome.
I'm glad if I could help you
Regards Ortwin
Man muss nicht alles wissen,
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
Re: Tag search not working
HI,
here's the fix for it: http://github.com/thorsten/phpMyFAQ/com ... 21ff65e3da
We rewrote the whole search during the 2.6.6 and 2.6.7 development because the code was almost 8 years old and caused a lot of troubles the last months. Normally I don't do that big changes during maintainance releases.
bye
Thorsten
here's the fix for it: http://github.com/thorsten/phpMyFAQ/com ... 21ff65e3da
We rewrote the whole search during the 2.6.6 and 2.6.7 development because the code was almost 8 years old and caused a lot of troubles the last months. Normally I don't do that big changes during maintainance releases.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Tag search not working
Hi,
ok, also a way to fix it, little bit more code, but... pagination won't work. For tags because there is no use of it, for search because pagination isn't build in request-class.
But anyway, it's a great work you've done with phpMyFAQ at all.
Regards Ortwin
ok, also a way to fix it, little bit more code, but... pagination won't work. For tags because there is no use of it, for search because pagination isn't build in request-class.
But anyway, it's a great work you've done with phpMyFAQ at all.
Regards Ortwin
Man muss nicht alles wissen,
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
man muss nur wissen wo es steht
** FAQ CMS Contenido (powered by phpMyFAQ) ** - ** Forum CMS Contenido ** - ** DCEonline ** - ** DevBlog **
Re: Tag search not working
Hi,
bye
Thorsten
the tag stuff uses other code with "old" pagination code, not the new class. It's in PMF_Faq::showAllRecordsByIds()oldperl wrote:ok, also a way to fix it, little bit more code, but... pagination won't work. For tags because there is no use of it, for search because pagination isn't build in request-class.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Re: Tag search not working
Thorsten,
I just tried the changes you made which still allows the tag search to work correctly but the normal search now fails to return results.
Regards,
Daryl.
I just tried the changes you made which still allows the tag search to work correctly but the normal search now fails to return results.
Regards,
Daryl.
Re: Tag search not working
Hi,
do you get any error?
bye
Thorsten
do you get any error?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Re: Tag search not working
Thorsten,
No errors displayed - just no results when searching, I suspect it's the else clause that has been added to line 76 of search.php:
} else {
$printResult = '';
}
Also, it looks like the change made on line 173 of search.jsp i.e. 'printResult' => $printResult means $faqSearchResults is now not being used, I'm assuming $faqSearchResults is the main search results object when a non TAG search is performed e.g. instant/advanced search etc?
Regards,
Daryl.
No errors displayed - just no results when searching, I suspect it's the else clause that has been added to line 76 of search.php:
} else {
$printResult = '';
}
Also, it looks like the change made on line 173 of search.jsp i.e. 'printResult' => $printResult means $faqSearchResults is now not being used, I'm assuming $faqSearchResults is the main search results object when a non TAG search is performed e.g. instant/advanced search etc?
Regards,
Daryl.
Re: Tag search not working
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 12
- Joined: Fri Aug 13, 2010 11:29 am
Re: Tag search not working
Thorsten,
Yes, I tried the fix which certainly fixes clicking on a tag in the tag cloud but causes the other searches to stop working.
I'll go back and check that I've applied the changes correctly if you're convinced the fix should work but so far the only way I can get both the tag cloud and searches to work is via the original suggestion from Ortwin.
Regards,
Daryl.
Yes, I tried the fix which certainly fixes clicking on a tag in the tag cloud but causes the other searches to stop working.
I'll go back and check that I've applied the changes correctly if you're convinced the fix should work but so far the only way I can get both the tag cloud and searches to work is via the original suggestion from Ortwin.
Regards,
Daryl.
Re: Tag search not working
Hi,
okay, I'll review my fix again.
bye
Thorsten
okay, I'll review my fix again.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist