Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.4k views
in Q2A Core by
I am getting an error "Maximum length is 8000 characters" while saving an answer. When I copy paste the same answer to microsoft word, it is reporting around 4000 characters in lengh. Can anyone please help here ?
by
moved by
Hi i have the same error. I need much more chars then 8k.

2 Answers

+1 vote
by
Yes, if you are using the default editor (CKeditor) then the character count includes all the HTML that is generated behind the scenes. So in this paragraph there may be N number of characters that you see, but there is also a <p> and </p> tag in the HTML which adds to the characters.

You can either use less formatting to fit your answer in (colours, sizes and links make a lot more HTML) or use a different editor like plain text or Markdown.
0 votes
by

Edit the file qa-include/db/maxima.php and change the value of the variable QA_DB_MAX_CONTENT_LENGTH from 12000 to a bigger value, e.g 20000

    'QA_DB_MAX_CONTENT_LENGTH' => 20000, 

This file has maximum values for many variables. You can change them as per your requirements.

    'QA_DB_MAX_EMAIL_LENGTH' => 80,
    'QA_DB_MAX_HANDLE_LENGTH' => 20,
    'QA_DB_MAX_TITLE_LENGTH' => 800,
    'QA_DB_MAX_CONTENT_LENGTH' => 18000,
    'QA_DB_MAX_FORMAT_LENGTH' => 20,
    'QA_DB_MAX_TAGS_LENGTH' => 800,
    'QA_DB_MAX_NAME_LENGTH' => 40,
    'QA_DB_MAX_WORD_LENGTH' => 80,
    'QA_DB_MAX_CAT_PAGE_TITLE_LENGTH' => 80,
    'QA_DB_MAX_CAT_PAGE_TAGS_LENGTH' => 200,
    'QA_DB_MAX_CAT_CONTENT_LENGTH' => 800,
    'QA_DB_MAX_WIDGET_TAGS_LENGTH' => 800,
    'QA_DB_MAX_WIDGET_TITLE_LENGTH' => 80,
    'QA_DB_MAX_OPTION_TITLE_LENGTH' => 40,
    'QA_DB_MAX_PROFILE_TITLE_LENGTH' => 40,
    'QA_DB_MAX_PROFILE_CONTENT_LENGTH' => 8000,
    'QA_DB_MAX_CACHE_AGE' => 86400,
    'QA_DB_MAX_BLOB_FILE_NAME_LENGTH' => 255,
    'QA_DB_MAX_META_TITLE_LENGTH' => 40,
    'QA_DB_MAX_META_CONTENT_LENGTH' => 8000,

...