Topic: Sending a post, an error appear, but the message is sending

I,

When i post a message with more than one line, i get an error in french:

Erreur : Impossible d'ajouter les mots index de recherche.

I get this error but the message is well sending.

Any idea to fix my problem ?

Cordially,

Pierito.

2

Re: Sending a post, an error appear, but the message is sending

could we have that in english?
and enable dubug mode and paste the error

3 (edited by pierito 2007-05-09 12:59)

Re: Sending a post, an error appear, but the message is sending

Here is the error in english :

Error : Unable to insert search index words

It is an error from include/search_idx.php

What do you think i have to do to fix it ?

Cordially,
Pierito.

Re: Sending a post, an error appear, but the message is sending

What is the full error with debug mode enabled?
And try rebuilding your search index.

Re: Sending a post, an error appear, but the message is sending

I don't understand how "to put the debug mode unable".

And i don't understand how to "rebuilt my search index".

6 (edited by pierito 2007-05-09 23:06)

Re: Sending a post, an error appear, but the message is sending

Voilà en debug mode, l'erreur :

Une erreur s'est produite
Fichier : /home/ailleu/public_html/punbbforum/include/search_idx.php
Ligne : 149

PunBB a rapporté :: Impossible d'ajouter les mots index de recherche

La base de données a rapporté : Duplicate entry 'equatoriens' for key 1 (Errno: 1062)

or another

Fichier : /home/ailleu/public_html/punbbforum/include/search_idx.php
Ligne : 149

PunBB a rapporté :: Impossible d'ajouter les mots index de recherche

La base de données a rapporté : Duplicate entry 'livre' for key 1 (Errno: 1062)

I see the "rebuilt the search index" in maintenance. I don't understand what it will do, and i am afraid to do that. I don't know if javascript is activate in my navigator, How to know it ? How to activate it ?

Maybe, i can do also something in phpmyadmin, tell me. I have pun_1search_words.

Cordially,
Pierito.

Re: Sending a post, an error appear, but the message is sending

Rebuilding the search index should help. It'll do nothing special, but if you have a large forum it could take a while.

Re: Sending a post, an error appear, but the message is sending

When i try to rebuilt the search index i obtain an error:

Une erreur s'est produite
Fichier : /home/ailleu/public_html/punbbforum/include/search_idx.php
Ligne : 149

PunBB a rapporté :: Impossible d'ajouter les mots index de recherche

La base de données a rapporté : Duplicate entry 'triomphe' for key 1 (Errno: 1062)

I can't rebuilt the search index, i have the error.

Re: Sending a post, an error appear, but the message is sending

Hrmm, that's odd. Try running the following query in phpMyAdmin:

TRUNCATE TABLE prefix_search_words

Replace "prefix_" with your prefix.

Then try rebuilding the search index again.

10 (edited by pierito 2007-05-11 11:47)

Re: Sending a post, an error appear, but the message is sending

By prefix you mean :

login_bdd2_

In phpMyadmin i need to be very helped.

In Query, i get "Field", "Sort", "Show", "Criteria", "And Or", "Modify". I don't know how to use that. But it is not the place.

You mean i run SQL query/queries in SQL, is it the right place ?

Re: Sending a post, an error appear, but the message is sending

I made TRUNCATE pun_1search_words successfully, then still the same error by rebuilt my search index.

Re: Sending a post, an error appear, but the message is sending

This is probably an ugly hack, but try this instead of the current line 149 in search_idx.php:

$db->query('INSERT INTO '.$db->prefix.'search_words (word) VALUES'.implode(',', preg_replace('#^(.*)$#', '(\'\1\')', $new_words)).' On DUPLICATE KEY UPDATE word = word') or error('Unable to insert search index words', __FILE__, __LINE__, $db->error());

Re: Sending a post, an error appear, but the message is sending

Ok. Like that it works.

It works.

But is it the very good solution ?

Re: Sending a post, an error appear, but the message is sending

To be honest, I have no idea. Do you intend to have a large forum?

Re: Sending a post, an error appear, but the message is sending

No, not so large.

Re: Sending a post, an error appear, but the message is sending

Well, it's still an ugly hack, but I don't know of a better way to fix it atm.