I got this error on install:

"An error has occured while creating default suggestions, please retry. If the problem persist please post an issue and report the code: #err_code:402"

Any ideas would be appreciated.

Thanks!

Comments

dom.’s picture

Hi!

This means for some reasons the search_autocomplete_suggestions table has not been correctly initialized.
What is the context of this error?
- if upgrading from another version, try to force updates from update_6200.
- if this is your first installation or if unwork: uninstall with proper procedure (under admin/modules) and retry. Eventually manually delete tables search_autocomplete_suggestions and search_autocomplete_forms (in desesperate situation only!).

With no more help from you about what you where doing (update, installation, ...) I can't tell more for now. If the problem still persists, could you also have a look at your site logs (see at admin/reports/dblog) for eventual SQL statement problem ?

Miro.

rick hood’s picture

Hi,

This was a new install of 6.x-2.2 which I downloaded today.

I see this in log entry at the time I did the install:

Column length too big for column 'sug_query' (max = 255); use BLOB or TEXT instead query: CREATE TABLE search_autocomplete_suggestions ( `sid` INT NOT NULL DEFAULT 0, `sug_fid` INT NOT NULL DEFAULT 0, `sug_enabled` INT NOT NULL DEFAULT 0, `sug_prefix` VARCHAR(15) NOT NULL DEFAULT '', `sug_title` VARCHAR(255) NOT NULL DEFAULT '', `sug_name` VARCHAR(255) NOT NULL DEFAULT '', `sug_dependencies` VARCHAR(255) NOT NULL DEFAULT '', `sug_weight` INT NOT NULL DEFAULT 0, `sug_query` VARCHAR(512) NOT NULL DEFAULT '' ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/yachtins/public_html/includes/database.inc on line 515.

When I disable then run uninstall, I get this:

"An error has occured while uninstalling the databases, please retry. If the problem persist please post an issue and report the code: #err_code:403"

After uninstall I do not see these tables:

search_autocomplete_suggestions
search_autocomplete_forms

When I install again I see search_autocomplete_forms but not search_autocomplete_suggestions.

Server is running MySQL 4.1.22 and PHP 5.2.11

Thanks!

dom.’s picture

Hi!

It took me some time but I got it (I guess). I can't reproduce the bug so only you can tell me if this would fix.
If I'm correct, it comes from the SQL version you have on your server (I have 5.1.56 myself): probably you have an inferior or egual to 4.1 (you can check at admin/reports/status).

I setted the sug_query length to 512, but SQL < 4.1 does not support more than 255. If I'm right it should not be difficult to correct.

How to:
1- uninstall the module completely and make sure both tables are deleted
2- take your 6.x-2.2 module and edit search_autocomplete.install:
--> at lign 136 you should have
'length' => 512,
make it
'length' => 255,
3- upload it to your server
4- install again

I hope this will fix!
Miro.

rick hood’s picture

That did it. Thanks!

Great module! Thank you and thank you for help!

dom.’s picture

Status: Active » Closed (fixed)