The 50,000 Symbols Barrier in Blogs. | Forum

Pages: 1 2 3 »
Tester Jan 12 '13
Is there a way to override the 50,000 Symbols Barrier in Blogs?
Tester Jan 14 '13
no response so far.
Team
Aliia Jan 14 '13
Tester, this can be changed in  'ow_blog_post' table in MySQL.
Currently "post" column is of "TEXT" data type, which is limited to  65,535 bytes ~64kb.



Change data type, for example to LONG TEXT, to increase max. size limit for blog posts.




The Forum post is edited by Aliia Jan 14 '13
Tester Jan 14 '13
Quote from Aliia Tester, this can be changed in  'ow_blog_post' table in MySQL.
Currently "post" column is of "TEXT" data type, which is limited to  65,535 bytes ~64kb. 
Thanks aplenty for the detailed instructions, Aliia. 
The Forum post is edited by Tester Jan 14 '13
Team
Aliia Jan 14 '13
Tester, as far as I know generally 1byte is one character ( in some languages can be 2 characters).
Developers recommend using MEDIUMTEXT for blogs.
Let me know if you get any further questions.
Tester Jan 14 '13
Quote from Aliia Tester, as far as I know generally 1byte is one character ( in some languages can be 2 characters).
Developers recommend using MEDIUMTEXT for blogs.
Let me know if you get any further questions.

Dear Aliia, I replaced TEXT with LONG TEXT, but users say it doesn't work. The only change is that there is no more the 
the 50,000 Symbols Barrier alert.
Team
Aliia Jan 14 '13
Tester, have you tested yourself?
Can you give exact steps ( along with the text you tried to enter) to reproduce this issue?
Screen shot would be great as well. Thank you.
Tester Jan 14 '13
No, I didn't, because things like fConnect work well for me but not for some users.

And at any rate I have already replaced  LONG TEXT with TEXT in the databases. Anyway, I will have another try with your instructions in mind, and will get back to you. Thanks. Regards.

Tester Jan 14 '13
A related issue. In many websites, there is either a character counter, or the editor box refuses to accept more characters while you type once the limit is reached. Here we have no such indicators. You post a long text, and you get the alert only when you press the Publish button. To avoid this problem I modified the Language: "Post body (Max 50,000 symbols):"
The Forum post is edited by Tester Jan 15 '13
Tester Jan 15 '13
Again after replacing TEXT with LONGTEXT, I added a text containing 60,000+ characters (according to MS-Word count). Unlike in the case of my friend I can see the alert  "This text can't be longer than 50000 symbols" 
Team
Aliia Jan 21 '13
Tester, after looking more at this I have found that you need to make a change in one more place.
Here is how Oxwall works.

1. You have a field type in your database.
2. Oxwall has a validator, which is causing the "This test can't be longer than 50 000 symbols" error.
This vaidator is created to inform users that they have reached the limit. Before the validator was implemented, users could have posted long texts, but since the field type ( in the database) limits number of characters, their posts were just automatically cropped to fit into the limits.  And users didn't even know that their posts were being cut. With the validator in place, system warns the user about the limits.

I have recommended changing the fields type to increase the limit, which is the  right thing. Now the database can accept more symbols, but validator is not disabled, therefore users keep getting the same error.

To change the validator's limits or to completely remove it go to:ow_core\form_element.php
Here is the line you are looking for:

$stringValidator = new StringValidator(0, 50000);


Change the number to whatever you want to.
Please note, that this validator applies not only to blog posts, but also to other features where "text" type of fields are involved. For examples forum posts.

So if you change the field type in the database to "Long Text" for blog posts, and change the validator's limit to 60 000 symbols, users will be able to post blogs within the 1-60 000 symbols range without problems. BUT, user might face problems with forum post, considering that the field type for forum posts in the database was not changed and is of "Text" type.
Team
Aliia Jan 21 '13
Tester, one more thing. Don't rely on the word count in MS Word.
Use special tool to count symbols. I have used Libre Office Viewer to count symbols in my text. It showed me that there were 40 000 symbols. But after checking in "Geany" edit , I have found out that my text actually contained  more then 41 000 symbols.  So the fact they MS Word shows that you have 40 000 symbols, doesn't really mean that considering utf-8 coding you actually have 40 000. Might be more.

The Forum post is edited by Aliia Jan 21 '13
Team
Aliia Jan 21 '13
Thank you Purusothaman.
Tester Jan 21 '13
Quote from Aliia To change the validator's limits or to completely remove it go to:ow_core\form_element.php Here is the line you are looking for: $stringValidator = new StringValidator(0, 50000);


Thanks for the bundle for information, Aliia. U r wonderful.I want to know whether the REMOVAL of the line $stringValidator = new StringValidator(0, 50000); would cause any problem? 
A second question is whether a bit of proper coding would automatically do pagination in blogs. I am just asking about the possibility. Right now, luckily, I have a very good computer programmer as my friend and our member.
Our Forums will never have a posting long enough to cause any problem. 

The Forum post is edited by Tester Jan 21 '13
Tester Jan 21 '13

Purusothaman Ramanujam:

I saw your link only after replying to Aliia.


So changing $stringValidator = new StringValidator(0, 50000); to 
$stringValidator = new StringValidator(0); is the right way?
Right and easy way to make the changes take effect through out all textboxes and not just for forum.
Tester Jan 21 '13
Thanks for the confirmation, Purusothaman
Tester Jan 21 '13
One doubt: what about the following line?

$stringValidator->setErrorMessage(OW::getLanguage()->text( 'base', 'text_is_too_long', array( 'max_symbols_count' => 50000 ) ));

I suppose this won't be executed if 50000 is removed.

Yes, If you removed that limit, this will never be executed.
Pages: 1 2 3 »