Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Validate length error

EathuisEathuis
edited October 2013 in Vanilla 2.0 - 2.8

How do I get rid of the "Validate Length" error that pops up when I exceed the body of the forum?

Comments

  • Options

    I just need to know where I can locate the file to change it, I have been looking through the global.js file and I can't find it.

  • Options
    EathuisEathuis
    edited October 2013

    I am sorry for triple posting...but I have narrowed it down to the "CLEditor jQuery WYSIWYG" and I don't know what to do from there...I have looked through 1000+ lines of code and I have a headache!

  • Options
    R_JR_J Ex-Fanboy Munich Admin
    edited October 2013

    Post as long as you get an answer - that's my opinion!
    1. What do you want to achieve? If you just want the red box to disappear it might be possible to edit some css (although I doubt it).
    2. What have you exactly found out by now? (Files, functions and so on)

    I have been looking at the source code and found a ValidateLength function here: library/core/functions.validation.php and some CLEditor related css there: plugins/cleditor/design/jquery.cleditor.css

    But by now I have not seen anything. CLEditor doesn't seem to validate the length - neither during nor after writing a post. Do you get the message while writing, previewing or before sending? It looks as it appears while you are writing a discussion.

    I'd recommend you start at the save function of the discussion model applications/vanilla/models/class.discussionmodel.php. So the little box you're seeing seems to be the result of a Vanilla form validation. Remember the core function ValidateLength? Seems to be related. The save function uses a config value Config('Vanilla.Comment.MaxLength') that in my config files does not exist. So the validation wouldn't be made in my test installation. Do you have a line like $Configuration['Vanilla']['Comment']['MaxLength'] = ... in your conf/config.phpor conf/config-defaults.phpfiles?

    By the way: please specify the version you are using and in this case also the theme

  • Options
    EathuisEathuis
    edited October 2013

    @R_J said:
    Post as long as you get an answer - that's my opinion!
    1. What do you want to achieve? If you just want the red box to disappear it might be possible to edit some css (although I doubt it).
    2. What have you exactly found out by now? (Files, functions and so on)

    I have been looking at the source code and found a ValidateLength function here: library/core/functions.validation.php and some CLEditor related css there: plugins/cleditor/design/jquery.cleditor.css

    But by now I have not seen anything. CLEditor doesn't seem to validate the length - neither during nor after writing a post. Do you get the message while writing, previewing or before sending? It looks as it appears while you are writing a discussion.

    I'd recommend you start at the save function of the discussion model applications/vanilla/models/class.discussionmodel.php. So the little box you're seeing seems to be the result of a Vanilla form validation. Remember the core function ValidateLength? Seems to be related. The save function uses a config value Config('Vanilla.Comment.MaxLength') that in my config files does not exist. So the validation wouldn't be made in my test installation. Do you have a line like $Configuration['Vanilla']['Comment']['MaxLength'] = ... in your conf/config.phpor conf/config-defaults.phpfiles?

    By the way: please specify the version you are using and in this case also the theme

    To my shame I know what it was, and in all my years of web development I never have felt so stupid :( I realised it was spam filter...sigh yeah my friggin' spam filter.

    Additional: I only triple posted because I went over 15 minutes and couldn't edit my previous comments.

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    At least you do not have to feel dumb that you couldn't figure it out by looking at the source code ;)

Sign In or Register to comment.