Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Keywords "There was an error while processing a database query"  (Read 3124 times)

0 Members and 1 Guest are viewing this topic.

jeeveser

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Keywords "There was an error while processing a database query"
« on: February 07, 2013, 01:18:27 am »

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?
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Keywords "There was an error while processing a database query"
« Reply #1 on: February 07, 2013, 04:54:17 am »

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
Code: [Select]
            $keyword = trim($keyword);
Replace with
Code: [Select]
            $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
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

jeeveser

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Keywords "There was an error while processing a database query"
« Reply #2 on: February 08, 2013, 11:28:18 pm »

Thank you so very much Jeff!
This solved it!

You are wonderful!

May God bless you!!!
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Keywords "There was an error while processing a database query"
« Reply #3 on: February 09, 2013, 05:38:22 am »

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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.