News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Posts isnt showing full

Started by vova1609, June 03, 2012, 08:26:30 AM

Previous topic - Next topic

vova1609

Hello! On my forum posts are not showing full :( >:(. All users reports... :'(
My forum hasn't words limit. Please help.
http://wpdev.cu.cc

vova1609


vova1609


ApplianceJunk

Please be patient and wait 24 hours before bumping your topic.

Arantor

Backup then convert the forum to UTF-8, wherein all posts will work properly afterwards (you'll have to edit any existing posts, though)

vova1609

Quote from: Arantor on June 03, 2012, 11:37:21 AM
Backup then convert the forum to UTF-8, wherein all posts will work properly afterwards (you'll have to edit any existing posts, though)
How to convert?

Arantor

It's in the Admin > Maintenance > Database area.

vova1609

I have following error:
QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc desc blob NOT NULL,
CHANGE COLUMN module module tinyblob NOT NULL,
' at line 3
File: /home/u814542290/public_html/Sources/ManageMaintenance.php
Line: 666

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
Please help me

Arantor

What mods do you have installed?

(And you DID take a backup first like I said, right?)

vova1609

Quote from: Arantor on June 03, 2012, 01:49:27 PM
What mods do you have installed?

(And you DID take a backup first like I said, right?)

SMFShop
Registered Links
Activity Bar
Karma Buttons
Advance Fake Guests n Users Online (Fake Online Time | S-Ace

Yes, I did. But I am really using database from 2.01 version. What should I do?

Arantor

First up, ignore that part of the error. The database did not change between 2.0.1 and 2.0.2, all it's telling me is that you installed it with 2.0.1 and have since upgraded to 2.0.2, nothing more.

Hmm, I don't recognise the table that it is referring to, unfortunately :/

vova1609

Quote from: Arantor on June 03, 2012, 02:35:36 PM
First up, ignore that part of the error. The database did not change between 2.0.1 and 2.0.2, all it's telling me is that you installed it with 2.0.1 and have since upgraded to 2.0.2, nothing more.

Hmm, I don't recognise the table that it is referring to, unfortunately :/
How to ignore? My database haven't converted to UTF8

Arantor

Ignore it as in 'the part of the error relating to the 2.0.1 database is actually irrelevant and wrong, just do not worry about it'.

The problem is you can't actually ignore the rest of the error, but the conversion code has a bug in it.

vova1609

Quote from: Arantor on June 04, 2012, 09:55:45 AM
Ignore it as in 'the part of the error relating to the 2.0.1 database is actually irrelevant and wrong, just do not worry about it'.

The problem is you can't actually ignore the rest of the error, but the conversion code has a bug in it.
Please tell me why posts isn't showing full on my forum.
Example: I want to create topic with text "Smf 2 Support site", then i submitted post and in topic i sea only: "Smf 2"

Colin

Arantor is attempting to help you. Please be patient as we are all volunteers.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

vova1609

I can't be patient because my forum is growing BUT users can't post!!! I tried to reinstall smf, but no results... Maybe problem in database

Arantor

I can't help you, to be honest. I don't recognise the tables you have, none of them seem to be related to the mods you have and the conversion code is actually broken anyway so even that won't help you.

Jade Elizabeth

What errors were in the log? Any? Arantor what's with his database?

I was looking at this earlier to see if maybe it could be something to do with CSS. Does this still happen on the default theme?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

It's not CSS related, it's the fact that it needs to be converted to UTF-8 to handle all the characters that need to be handled, but there's a mod or two that added tables I don't recognise and that cause the converter to choke on it.

Jade Elizabeth

Added tables or columns?

Can we not back up those tables, delete them, and add them again later?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

That's the thing, I don't know how those tables or columns are used (and it doesn't really matter which in this particular case), and depending on how they're used it may not be possible to remove them without causing database errors while the conversion takes place.

Jade Elizabeth

Well isnt there a way to convert them in the database?

You know what maybe we should just back up members, posts, and topics....smf crap, and reinstall cleanly. At least then we will have rescued posts and members.

vova1609...when did this start happening? If you installed a mod just before it happened can you uninstall it and see if it gets fixed?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

Yes, there is a way to convert the database - but it won't work, that's the problem! It chokes on the conversion because of these extra columns.

Jade Elizabeth

Even through phpmyadmin? I thought they had a way too?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

MrPhil

Of course they can be manually converted in phpMyAdmin. The trick is figuring out what needs to be done. I suppose you could go through and look at the "Structure" of every table, looking for text fields that are still "latin1", selecting them, converting them to "utf8", etc. Are there any that shouldn't be converted to UTF-8? Email-related text, perhaps?

If SMF is using a fixed list of tables and fields to convert, that's a dumb design. It should be querying all tables and all fields in tables. That, or when a mod adds a text field, it should go into a list (schema) for any updates.

Of course, the very best solution would be to ship SMF as UTF-8 only and be done with it.

Jade Elizabeth

Yeah I don't understand how this can be a database problem....if the information exists in the database something else is stopping all of it being shown?

MrPhil I would like to like your post but there's no way to do so lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

MrPhil

Quote from: Jade Elizabeth on June 05, 2012, 01:02:45 PM
if the information exists in the database something else is stopping all of it being shown?

Yes. If there are Microsoft "Smart Quotes" in the text, a browser will interpret them as control codes and may easily cut off the post at that point. I can never understand why people have a compulsion to type in their posts into Word and then cut and paste to SMF. Switching to UTF-8 will sometimes help with new posts (Smart Quotes are translated to proper UTF-8 equivalents upon input), but won't help with old posts if MySQL didn't translate the Smart Quotes during conversion.

Jade Elizabeth

So does that mean it's a problem with WYSIWYG?

Because when I post from word it never caused me a problem.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

MrPhil

Nothing to do with WYSIWYG. It's a problem with pasting in certain "Smart Quotes" byte values, which are standardized as control codes. If your forum is UTF-8, some browsers will know to convert Smart Quotes to legal characters. Or, some browsers where you specify Latin-1 as the encoding, will actually display CP-1252, and interpret Smart Quotes as intended. Either of those may be what's happening to you.

vova1609

Quote from: Jade Elizabeth on June 05, 2012, 09:47:20 AM
Well isnt there a way to convert them in the database?

You know what maybe we should just back up members, posts, and topics....smf crap, and reinstall cleanly. At least then we will have rescued posts and members.

vova1609...when did this start happening? If you installed a mod just before it happened can you uninstall it and see if it gets fixed?
I tried( I removed forum and installed again without mods) but problem wasn't solved :( .I think that means that problem in database

Jade Elizabeth

Okay but if I paste crap into the text box here it unformats smart quotes, so it IS a problem with WYSIWYG! Because WYSIWYG preserves them and maybe it shouldnt if they're a problem.

@vova1609 Is it okay with you if I have a look? If we remove the columns and tables not native to SMF then we can convert it for you. Once converted you can install the mods again but you will lose all the data from the mods.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

vova1609

Quote from: Jade Elizabeth on June 06, 2012, 02:50:15 AM
Okay but if I paste crap into the text box here it unformats smart quotes, so it IS a problem with WYSIWYG! Because WYSIWYG preserves them and maybe it shouldnt if they're a problem.

@vova1609 Is it okay with you if I have a look? If we remove the columns and tables not native to SMF then we can convert it for you. Once converted you can install the mods again but you will lose all the data from the mods.
I should only convert? Am I right?

Jade Elizabeth

If we remove the tables and columns not in an SMF install we should be able to convert the database to utf-8. But you will lose any of the data that was in the tables we remove. You'll have anything that came with SMF but nothing that you installed.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

vova1609

Quote from: Jade Elizabeth on June 06, 2012, 08:06:24 AM
If we remove the tables and columns not in an SMF install we should be able to convert the database to utf-8. But you will lose any of the data that was in the tables we remove. You'll have anything that came with SMF but nothing that you installed.
I'll lose all posts, members etc? Please tell me what should I do

Jade Elizabeth

No you wont lose posts or members, I could tell you what you would lose if you could give me a list of mods you have installed. If you go to admin > Packages > Installed Packages there is a list :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

MrPhil

Quote from: Jade Elizabeth on June 06, 2012, 02:50:15 AM
Okay but if I paste crap into the text box here it unformats smart quotes, so it IS a problem with WYSIWYG! Because WYSIWYG preserves them and maybe it shouldnt if they're a problem.

I'm not sure we're talking about the same thing. Smart Quotes are the typographically correct quotation marks, em dashes, etc. that Word replaces ', ", --, etc. with. You can see quotation marks that look like "66" and "99" instead of straight. The problem is that Microsoft chose to extend the Latin-1 character set (encoding) by reusing 32 reserved control codes (x80 through x9F) for punctuation not found in Latin-1. This they call "CP-1252" or "Windows-1252" encoding. They did something similar with their other CP-xxxx encodings, but in some cases replace punctuation with letters because they ran out of space  (example: CP-1251 Cyrillic).

When you cut and paste, what comes over in the clipboard are byte numeric codes, not the glyphs (visible symbols). These take on the meaning of whatever the encoding in use (in the receiving page) means. Some browsers will evidently convert on the fly to the appropriate UTF-8 symbols, but others won't. If those bytes that were pasted in are interpreted as control codes (as they're supposed to be), it can cause the text to be cut off at that point or other damage done.

Whether you're in WYSIWYG mode is irrelevant as to whether (and how) bytes are converted. The browser doesn't know anything about WYSIWYG mode -- that's application level (SMF). From the wording of your post, I think you're confusing Smart Quotes with HTML (or other) formatting. E.g., something in italics will usually lose the formatting and come over in the clipboard as normal text. That's perfectly normal behavior, and is a function of the clipboard.

Jade Elizabeth

Ahh I get you now, thank you for letting me know. I've been learning a little about that stuff but I wasnt thinking so technical!

I think we need to get a Dev in this topic.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

vova1609

Quote from: Jade Elizabeth on June 06, 2012, 11:42:10 AM
Ahh I get you now, thank you for letting me know. I've been learning a little about that stuff but I wasnt thinking so technical!

I think we need to get a Dev in this topic.
I'll try

vova1609

Which Data character set should I choose? ???

There are a lot of character sets: Big5, ISO 8859-1, ISO-8859-2 or ISO-8850-9 etc......

MrPhil

Quote from: Jade Elizabeth on June 06, 2012, 08:06:24 AM
If we remove the tables and columns not in an SMF install we should be able to convert the database to utf-8. But you will lose any of the data that was in the tables we remove. You'll have anything that came with SMF but nothing that you installed.

Does the UTF-8 conversion have problems with ignoring added fields or tables, or does it choke on them? If the former, I would think you could simply do a UTF-8 conversion and then use phpMyAdmin to browse the table structures and manually convert anything still Latin-1 over to UTF-8. If added fields or tables cause SMF conversion to blow up, that's a bug in the conversion code.

Arantor

It's choking on the names of some of the columns in some of the existing tables.

MrPhil

So these field names are SQL reserved keywords, like "desc"? In queries you can put such names in backticks `, does that work with the conversion calls?

Sources/ManageMaintenance.php
foreach ($columns as $column)
{
$updates_blob .= '
CHANGE COLUMN ' . $column['Field'] . ' ' . $column['Field'] . ' ' . strtr($column['Type'], array('text' => 'blob', 'char' => 'binary')) . ($column['Null'] === 'YES' ? ' NULL' : ' NOT NULL') . (strpos($column['Type'], 'char') === false ? '' : ' default \'' . $column['Default'] . '\'') . ',';

would be changed to
foreach ($columns as $column)
{
$updates_blob .= '
CHANGE COLUMN `' . $column['Field'] . '` `' . $column['Field'] . '` ' . strtr($column['Type'], array('text' => 'blob', 'char' => 'binary')) . ($column['Null'] === 'YES' ? ' NULL' : ' NOT NULL') . (strpos($column['Type'], 'char') === false ? '' : ' default \'' . $column['Default'] . '\'') . ',';

vova1609

Help please
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc desc blob NOT NULL,
CHANGE COLUMN module module tinyblob NOT NULL,
' at line 3
File: /home/u814542290/public_html/Sources/ManageMaintenance.php
Line: 666

MrPhil

QuoteCHANGE COLUMN module module tinyblob NOT NULL

So where are the ` (backticks) you tried adding? It should look like

QuoteCHANGE COLUMN `module` `module` tinyblob NOT NULL

I can't guarantee that will fix it, but it's worth trying.

knowlsey

strange kettle of fish, i had one forum running no problems, post showed in full etc, then began the install of another forum and the same problem described in the original topic appeared, post was not showing in full, used all the same mods as other forum

converted database to utf-8 and hey presto, problem solved

Jade Elizabeth

I think it's because special characters stop loading. I had a similar problem with a mod itself but it was fixed shortly after I reported it :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: