I installed Gallery 2, beta 4. It worked fine.
I run Drupal 5.2.

Several days after, I decided to re-index my site, and I had errors when accessing the database.

My site is multi-language. Main language is french. Re-indexation of the site:
Using french, re-index fails:
"# user warning: Column count doesn't match value count at row 1 query: INSERT INTO search_index (word, sid, type, score) VALUES ('open', 44, 'node', 7,7535278514589) in /MySite/includes/database.mysql.inc on line 172."
If I switch to english, re-index works.
If I switch to german, re-index fails.

After having done several other tests with different sites, I started suspecting Gallery 2, beta 4, which was a main difference between sites where it was OK and the site where the problem occured.

I de-activated the Gallery menu module (but kept Gallery main module active) and all problems disappeared. Re-index of the site and search function went back to operational mode, whatever language was used.

Looking at Drupal logs, I noticed that there were:
Error fetching album tree
from Gallery.
After de-activation of Gallery menu module, errors disappeared.

So my conclusion so far has been:
- if you install and activate Gallery 2 menu module beta 4
- if you use other language than english
search/indexation does not work properly anymore.
De-activating the "menu" module (while keeping Gallery 2 main module active) seems to fix the problem.

Comments

profix898’s picture

Can you please grab the latest development version 5.x-2.x-dev (http://drupal.org/node/138771) and try again? A patch for gallery_fetch_album() stuff went in after beta4 was released, so potentially your problem is fixed already as well.

dpierre’s picture

Latest version does not fix the problem observed with indexation/.search.
I had to de-activate Gallery 2 menu module as in beta 4.

profix898’s picture

Status: Active » Postponed (maintainer needs more info)

Can't reproduce. Can you provide a step-by-step guide to reproduce this issue?

If I switch to german, re-index fails.

What do you mean? How do you switch to german? Making 'german' the default language? Do you use any additional modules, such as i18n?

profix898’s picture

Component: gallery_menu.module » Module: Gallery Menu

I'm still not sure what is causing this issue. But if you are using the i18n module, try to update to the latest 5.x-2.x-dev version of gallery module. I committed an i18n patch to it yesterday, because language-negotiation was partly broken between Drupal and G2.

dpierre’s picture

I am not sure that I use the i18n module. I have activated the "locale 5.2" module of Drupal Core (and I do not think it is what you call i18N. Is it?).
I upgraded to Gallery Beta 5.
The problem still appears when the Galley Menu is activated.

The problem does not seem to be linked to the "default language" declared in "localization".
The problem seems to be linked to the "user language".

Two exemples:
- Drupal default language = french. "User language = french/german", search fails; "user language = english", search is OK
- Drupal default language = english. "User language = french/german", search fails; "user language = english", search is OK

Tsevrah’s picture

I'm using a polish locale, and i encountered the same problem when I try searching with the gallery-module enabled i get :

* user warning: Operand should contain 1 column(s) query: CREATE TEMPORARY TABLE temp_search_results SELECT i.type, i.sid, 5 * (3,16721541181 * i.relevance) + 5 * POW(2, (GREATEST(n.created, n.changed, c.last_comment_timestamp) - 1203079790) * 6.43e-8) + 5 * (2.0 - 2.0 / (1.0 + c.comment_count * 1)) AS score FROM temp_search_sids i INNER JOIN cms_search_dataset d ON i.sid = d.sid AND i.type = d.type INNER JOIN cms_node n ON n.nid = i.sid LEFT JOIN cms_node_comment_statistics c ON c.nid = i.sid WHERE (d.data LIKE '% test %') ORDER BY score DESC in /xxx/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'cms_cms.temp_search_results' doesn't exist query: SELECT COUNT(*) FROM temp_search_results in /xxx/public_html/includes/database.mysql.inc on line 172.

Without it everything works like a charm :)

Sorry this http://drupal.org/node/193214 solves the problem.

dpierre’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)