Advertisement:

Author Topic: Database error -- Please try again. (when pasting from anything)  (Read 3175 times)

Offline astroannie

  • Newbie
  • *
  • Posts: 9
This occurs because of incompatible characters.  The characters in question are quotation marks (left and right), apostrophes, and emdashes.  If I manually replace them with ", ' and -- I don't get the error message.  When I do get the error message, I have to abort that message and start a new one, as fixing the existing message and resubmitting gives a message that I already posted. 

SMF 2.0.15 with Postgres.  (I don't operate the server so am unsure how to get the Postgres version #, but could find out tomorrow during business hours). 

Is there a patch or mod I need to fix this issue?   Or is there a setting I need to tweak?

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,339
  • Gender: Male
    • Macedonian electronics forum
Re: Database error -- Please try again. (when pasting from anything)
« Reply #1 on: April 02, 2018, 05:42:39 AM »
Have you converted the database to UTF-8 with the SMF conversion tool (in the admin panel)?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Online albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 342
Re: Database error -- Please try again. (when pasting from anything)
« Reply #2 on: April 02, 2018, 07:18:25 AM »
Which pg version you use?
Which charcode got your database?
Please check you database log (from pg not smf) ther you see the complet error message.

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #3 on: April 02, 2018, 09:34:30 PM »
Have you converted the database to UTF-8 with the SMF conversion tool (in the admin panel)?

I cannot locate this conversion tool.  Can you tell me where in the docs to read about it or where in the admin panel to find it?  I'm 2.0.15 

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #4 on: April 02, 2018, 09:36:28 PM »
Which pg version you use?
Which charcode got your database?
Please check you database log (from pg not smf) ther you see the complet error message.

I think converting it will fix it if I can figure out how:

Quote
Database Error: ERROR: invalid byte sequence for encoding "UTF8": 0x92
Apply Filter: Only show the errors from this file File: /var/www/thisgrrl.com/smf/Sources/Subs-Post.php
Line: 1816

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #5 on: April 02, 2018, 10:55:36 PM »
PostgreSQL 9.6 is the version I have.

Also, my admin says the database isn't the problem -- SMF is not properly handling the characters and converting them from "windows page encoding" to UTF8.

"When you connect to the database with UTF8, you're making a promise to the database that you're going to give it UTF8 and these codes are NOT UTF8 and the database can't cope." says my admin.

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #6 on: April 02, 2018, 11:09:07 PM »
“I saw she had a shortcut for something named ‘Lobachevsky’ on her desktop,” Lindeman said.

(The above is an example of what I'm copy/pasting from a vBulletin forum to my SMF forum -- it is from a story I authored that won a prize challenge). 

Online albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 342
Re: Database error -- Please try again. (when pasting from anything)
« Reply #7 on: April 03, 2018, 05:39:11 AM »
That the error is in smf is clear (was never the question).
The issue is that the smf say it send the data in utf8 but send is in a different charcode,
maybe in your setting a different charcode is defined.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,339
  • Gender: Male
    • Macedonian electronics forum
Re: Database error -- Please try again. (when pasting from anything)
« Reply #8 on: April 03, 2018, 06:00:51 AM »
I cannot locate this conversion tool.  Can you tell me where in the docs to read about it or where in the admin panel to find it?  I'm 2.0.15

Admin --> Maintenance --> Forum Maintenance --> Database --> Convert HTML-entities to UTF-8 characters
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Online albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 342
Re: Database error -- Please try again. (when pasting from anything)
« Reply #9 on: April 03, 2018, 06:04:35 AM »
You shouldn't touch the convert tool,
so long you smf and you database "speak" different charcode without knowing each other.

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #10 on: April 03, 2018, 07:17:13 AM »
In the Admin > Maintenance > Forum Maintenance > Database area I see only

Optimize

Backup

Do I need to install a package?

Online albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 342
Re: Database error -- Please try again. (when pasting from anything)
« Reply #11 on: April 03, 2018, 09:01:26 AM »
This function exists in 2.0.x only for mysql setup and only when you activate utf8 mode on smf side.

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #12 on: April 03, 2018, 11:20:02 AM »
so, basically, I'm screwed because I don't have MySQL? 

Is there a package I can install that will solve this? 

Online albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 342
Re: Database error -- Please try again. (when pasting from anything)
« Reply #13 on: April 03, 2018, 11:30:35 AM »
Nope you screwed because you don't read.
I ask you which charcode is setup in your settings and you didn't awnser.

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #14 on: April 03, 2018, 11:55:43 AM »
I ask you which charcode is setup in your settings and you didn't awnser.

Where do I find that? 

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,339
  • Gender: Male
    • Macedonian electronics forum
Re: Database error -- Please try again. (when pasting from anything)
« Reply #15 on: April 03, 2018, 03:29:10 PM »
Admin --> Configuration --> Languages --> Edit Languages
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline astroannie

  • Newbie
  • *
  • Posts: 9
Re: Database error -- Please try again. (when pasting from anything)
« Reply #16 on: April 03, 2018, 04:24:19 PM »
Bless all y'all ... it was set to ISO-mumbo-jumbo and I installed and set it to UTF8 and it's happy now.