Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The search menu and page doesn't found any content on the page #5209

Open
sanslash332 opened this issue Mar 12, 2024 · 8 comments
Open
Assignees
Labels
status: pending This issue is being worked on or is in the backlog to be fixed. type: bug A problem that should not be happening
Milestone

Comments

@sanslash332
Copy link

What e107 version are you using?

Latest Github version (just updated)

Bug description

Hello guys. With a few friends we have a production Ready site using e107 since 2015, and recently we've updated from 2.2 to the latest git 2.4.0, and upgraded from php 5.6.40 to 7.4.33, because well... the hosting is deprecating all php below version 7, so we had to update. ANd for future we are planing to upgrade to php8.

We lost some small plugins and other small things during the update process that aren't important, but we found that the search feature isn't working on the new version.
We tried using the search menus and page, but the query didn't found anithing. The site have a lot of content on downloads, forums, news, but the search can't find anythin.
This is the page
https://www.tiflojuegos.com
Is in spanish.

Is something wrong with that plugin? We forget configure something?
All other things works veri fine.

A, is a site for blind people, so... dont take care about the theme; we are using the default bootstrap5. Because our old theme (defianstrap) aren't compatible with php8.

How to reproduce

  1. open the tiflojuegos website at www.tiflojuegos.com
  2. write something on the searchbox. Example manamon, windows, mud, doom, etc.
  3. press enter
  4. See how the search results are empty
  5. try to find other thing. same result.
  6. check page content to verify that the site isn't empty.

Expected behavior

That the search feature works. Finding the exact results or similar according with the search.

What browser(s) are you seeing the problem on?

Firefox, Chrome / Brave, Microsoft Edge

PHP Version

7.4.33

@sanslash332 sanslash332 added the type: bug A problem that should not be happening label Mar 12, 2024
@Jimmi08
Copy link
Contributor

Jimmi08 commented Mar 12, 2024

@sanslash332 try to go to Preferences, Search, and resave settings.

@sanslash332
Copy link
Author

thanks @Jimmi08 for the tip.
I've did that, but no luck.

I go to the settings / search menu and save preferences, inclusive edited some of the searchable areas changing things like results displayed per page and other things to force a setting change, but same behavior. Any thing that you search got nothing as a result.

Maybe a method to check which mysql query is using the system?

Or some other thing that can be bad configured?

Thanks

@Jimmi08
Copy link
Contributor

Jimmi08 commented Mar 12, 2024

I can't help more, I had a similar issue, I debugged and I found that relevance is not working for me.
#5198

@Alex-e107nl
Copy link

Alex-e107nl commented Mar 12, 2024

I can confirm that with the latest GitHub the search function no longer works, English or Dutch makes no difference, PHP Version 8.1.27, e107 Version 2.4.0 (git), MySQL 10.5.24-MariaDB you can test it on https://e107.nl/search screen_search_2024-03-12 101230

Settings admin:
screen_search_2024-03-12 101230

@Jimmi08
Copy link
Contributor

Jimmi08 commented Mar 12, 2024

thanks @Jimmi08 for the tip. I've did that, but no luck.

Maybe a method to check which mysql query is using the system?

Thanks

Go to preferences, Advanced and set developer mode ON. Then select SQL Analysis
image

You should get something like this:
image

Copy the query and put it directly to phpmyadmin.

In my case it should found something in pages

SELECT SQL_CALC_FOUND_ROWS p.page_id, p.page_title, p.page_sef, p.page_text, p.page_chapter, p.page_datestamp, p.menu_image, ((1.2 * (MATCH(p.page_title) AGAINST ('lorem' IN BOOLEAN MODE))) + (0.6 * (MATCH(p.page_text) AGAINST ('lorem' IN BOOLEAN MODE))) + (1.0 * (MATCH(p.page_metakeys) AGAINST ('lorem' IN BOOLEAN MODE))) + (0.5 * (MATCH(p.page_fields) AGAINST ('lorem' IN BOOLEAN MODE)))) AS relevance FROM e107_page AS p LEFT JOIN e107_page_chapters AS c ON p.page_chapter = c.chapter_id WHERE (c.chapter_visibility IN (253,247,254,250,251,0) OR p.page_chapter = 0) AND p.page_class IN (253,247,254,250,251,0) AND p.page_text != '' AND (MATCH(p.page_title) AGAINST ('lorem' IN BOOLEAN MODE) || MATCH(p.page_text) AGAINST ('lorem' IN BOOLEAN MODE) || MATCH(p.page_metakeys) AGAINST ('lorem' IN BOOLEAN MODE) || MATCH(p.page_fields) AGAINST ('lorem' IN BOOLEAN MODE)) HAVING relevance > 0 ORDER BY relevance DESC , page_datestamp DESC LIMIT 0,10;

getting error: Can't find FULLTEXT index matching the column list

Tested in 2.3.3 database - it works, tested in latest github - it doesn't.

@Deltik
Copy link
Member

Deltik commented Mar 12, 2024

Okay… this is a moderate challenge to fix…

Indeed, the search bug was caused by the migration from MyISAM to InnoDB in #4501.

We somehow need to CREATE FULLTEXT INDEX for every field specified in the search_fields key returned by overrides of e_search::config() (in the e_search addons). Perhaps this is something that can be implicitly derived in /e107_admin/db.php.

@Deltik Deltik added the status: pending This issue is being worked on or is in the backlog to be fixed. label Mar 12, 2024
@Moc Moc added this to the e107 2.4.0 milestone Mar 12, 2024
@sanslash332
Copy link
Author

Just for have more evidence, but its the same bugs that various of you show before:

here the query that I've got through the debug system of the page, when search the word "manamon" over the download section. On the site exists a page with exact that name, so the system must found it.

SELECT SQL_CALC_FOUND_ROWS d.download_id, d.download_sef, d.download_category, d.download_name, d.download_description, d.download_author, d.download_author_website,
d.download_datestamp, d.download_class, c.download_category_id, c.download_category_name, c.download_category_sef, c.download_category_class, ((1.2 * (MATCH(d.download_name)
AGAINST ('manamon' IN BOOLEAN MODE))) + (0.9 * (MATCH(d.download_url) AGAINST ('manamon' IN BOOLEAN MODE))) + (0.6 * (MATCH(d.download_description) AGAINST
('manamon' IN BOOLEAN MODE))) + (0.6 * (MATCH(d.download_author) AGAINST ('manamon' IN BOOLEAN MODE))) + (0.4 * (MATCH(d.download_author_website) AGAINST
('manamon' IN BOOLEAN MODE)))) AS relevance FROM e107_download AS d LEFT JOIN e107_download_category AS c ON d.download_category = c.download_category_id
WHERE download_active > '0' AND d.download_visible IN (3,0,1,2,253,254,250,251) AND c.download_category_class IN (3,0,1,2,253,254,250,251) AND (MATCH(d.download_name)
AGAINST ('manamon' IN BOOLEAN MODE) || MATCH(d.download_url) AGAINST ('manamon' IN BOOLEAN MODE) || MATCH(d.download_description) AGAINST ('manamon' IN
BOOLEAN MODE) || MATCH(d.download_author) AGAINST ('manamon' IN BOOLEAN MODE) || MATCH(d.download_author_website) AGAINST ('manamon' IN BOOLEAN MODE))
HAVING relevance > 0 ORDER BY relevance DESC , download_datestamp DESC LIMIT 0,10;

The system found 0 results, and this error appear on the page:

SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list
SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list

Same errors got on phpmyadmin.

#1191 - No puedo encontrar índice FULLTEXT correspondiendo a la lista de columnas
translated to english is the same of abobe.

Well, thanks for all guys; wait to the fix :-)

@sanslash332
Copy link
Author

For anybody that can't wait to the fix be solved on the code,

You can follow the instructions of @Deltik on this comment.
#4501 (comment)

It solved the problem for me without changing the database structure. ¡thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending This issue is being worked on or is in the backlog to be fixed. type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

5 participants