Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Keywords "There was an error while processing a database query"  (Read 2983 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.018 seconds with 20 queries.