"piwigo_user_cache_categories doesn't exist" error on search #594

Closed
opened 2026-10-05 00:06:27 +02:00 by adam · 2 comments
Owner

I just upgraded to 2.9.0RC1 from 2.9.0beta2 by just unzipping the latest archive over my existing folder. Site is working, but when I try to do a search, I get this error:

Piwigo encountered an unrecoverable error.
[mysql error 1146] Table 'piwigo-beta.piwigo_user_cache_categories' doesn't exist

SELECT
    *
  FROM categories
    INNER JOIN piwigo_user_cache_categories ON id = cat_id and user_id = 1
  WHERE (name REGEXP '[[:<:]]lhs[[:>:]]'
 OR comment REGEXP '[[:<:]]lhs[[:>:]]'
 OR name REGEXP '[[:<:]]lh[[:>:]]'
 OR comment REGEXP '[[:<:]]lh[[:>:]]')

#1	my_error /usr/local/piwigo-beta/include/dblayer/functions_mysqli.inc.php(147)
#2	pwg_query /usr/local/piwigo-beta/include/functions_search.inc.php(1148)
#3	qsearch_get_categories /usr/local/piwigo-beta/include/functions_search.inc.php(1390)
#4	get_quick_search_results_no_cache /usr/local/piwigo-beta/include/functions_search.inc.php(1307)
#5	get_quick_search_results /usr/local/piwigo-beta/include/functions_search.inc.php(1480)
#6	get_search_results /usr/local/piwigo-beta/include/section_init.inc.php(356)
#7	include /usr/local/piwigo-beta/index.php(27)

In my database, the table name is 'user_cache_categories' not 'piwigo_user_cache_categories' (none of my tables start with 'piwigo_').

This only seems to affect quick search from the menu. Searching from the search page seems to work fine.

I just upgraded to 2.9.0RC1 from 2.9.0beta2 by just unzipping the latest archive over my existing folder. Site is working, but when I try to do a search, I get this error: ``` Piwigo encountered an unrecoverable error. [mysql error 1146] Table 'piwigo-beta.piwigo_user_cache_categories' doesn't exist SELECT * FROM categories INNER JOIN piwigo_user_cache_categories ON id = cat_id and user_id = 1 WHERE (name REGEXP '[[:<:]]lhs[[:>:]]' OR comment REGEXP '[[:<:]]lhs[[:>:]]' OR name REGEXP '[[:<:]]lh[[:>:]]' OR comment REGEXP '[[:<:]]lh[[:>:]]') #1 my_error /usr/local/piwigo-beta/include/dblayer/functions_mysqli.inc.php(147) #2 pwg_query /usr/local/piwigo-beta/include/functions_search.inc.php(1148) #3 qsearch_get_categories /usr/local/piwigo-beta/include/functions_search.inc.php(1390) #4 get_quick_search_results_no_cache /usr/local/piwigo-beta/include/functions_search.inc.php(1307) #5 get_quick_search_results /usr/local/piwigo-beta/include/functions_search.inc.php(1480) #6 get_search_results /usr/local/piwigo-beta/include/section_init.inc.php(356) #7 include /usr/local/piwigo-beta/index.php(27) ``` In my database, the table name is 'user_cache_categories' not 'piwigo_user_cache_categories' (none of my tables start with 'piwigo_'). This only seems to affect quick search from the menu. Searching from the search page seems to work fine. <!-- github-sync-id:219107245 -->
adam closed this issue 2026-10-05 00:06:27 +02:00
Author
Owner

Found the problem ... this incorrect table name is in include/functions_search.inc.php. I fixed that in my installation and quick search started working again.

Found the problem ... this incorrect table name is in include/functions_search.inc.php. I fixed that in my installation and quick search started working again. <!-- github-comment-id:291350549 -->
Author
Owner

@jradwan thank you for the report, easy to fix ;-)

@jradwan thank you for the report, easy to fix ;-) <!-- github-comment-id:291497334 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#594