Keywords "There was an error while processing a database query" Keywords "There was an error while processing a database query"
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Keywords "There was an error while processing a database query"

Started by jeeveser, February 07, 2013, 01:18:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jeeveser

Hi all,
I'm getting this error when I click "regenerate dictionary".

I've put the site in "debug" mode:
http://www.odbdgallery.com

This is what I get in debug mode:

Critical error
There was an error while processing a database query.

While executing query 'INSERT INTO cpg15x_dict (keyword) VALUES ('Happy Easter Daffodil Tag Set Daffodil Corner Daffodil Tag Single')' in keyword_create_dict.php on line 49

mySQL error: Duplicate entry 'Happy Easter Daffodil Tag Set Daffodil Corner Daffodil Tag S' for key 'key

File: /home3/ourdail7/public_html/odbdgallery/include/functions.inc.php - Line: 270

I recently tried installing the SocialShare plugin but had to uninstall due to this same error.

Any ideas?

Jeff Bailey

Looks like you'll have to adjust the varchar length of the keyword column in cpg15x_dict and then fix the keywords that where cut at 60 characters.

You could also try this edit but it won't enter a new keyword in the list if the keyword is exactly the same as another up to 60 characters.
In keyword_create_dict.php
Find

            $keyword = trim($keyword);

Replace with

            $keyword = (strlen($keyword) > 60) ? substr($keyword,0,60) : $keyword;
            $keyword = trim($keyword);


Or you could shorten keywords by using the keyword separator.
Default would be
Happy Easter Daffodil Tag Set Daffodil Corner Daffodil Tag Single
becomes
Happy Easter;Daffodil Tag Set;Daffodil Corner;Daffodil Tag Single
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

jeeveser

Thank you so very much Jeff!
This solved it!

You are wonderful!

May God bless you!!!

Jeff Bailey

Thank you for confirming.
I've marked your thread as solved, please press the topic solved button at the bottom of the page in your future threads.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford