8

I was looking to close a recent question as a shopping request, and there was a standard comment I used to place on questions when doing so, which was:

Questions requesting recommendations for books / software / apps / papers etc. would fall into the shopping request category and aren't really suitable to a Q&A website. The reason for this is that there is no one correct answer, and any recommended items would soon be updated and replaced with newer / better versions making the best answers redundant. Therefore you're better off visiting our Chat site for such discussions, they're not really suitable for this main site I'm afraid.

This is a fine length to be placed as a standard comment on posts. However if I try to use this same text in place of the 'I'm voting to close this as off topic because...' placeholder I am told that my comment is too long by 56 characters.

Why is the close reason comment shorter than a standard comment when they both end up as comments against the question anyway? And can this be extended to match, so that I can reuse my lovely-worded comment when closing these posts.

  • Yeah, but even deleting that doesn't give you those free characters back. – JonW Jun 17 '15 at 14:29
  • 1
    Rene is right - the backing field for custom off-topic reasons in the DB is 500 characters long. – Oded Jun 19 '15 at 9:03
12

I borrowed the hacker-hat from nicael but I don't have high hopes this restriction is just an oversight or to strict client-side validation.

length should be less then 500 chars

This is the json payload that came back on the post to close/add when I get rid of the client-side validation:

{"Success":false,
 "Message":"Off-topic > other comments should be between 30 and 500 characters",
 "ResultChangedState":false}

The client-side validation has that value of 500 clearly in the charCounter initialization:

function close_initOffTopicSubPane()
{
    var div = _closePopup.find('.off-topic-other-comment-container'),
        txt = div.find('textarea'),
        isValid = function(isValid)
        {
            var customValid = isValid && ensureNotInitialValue();
            _closePopup.find('.popup-submit').enable(customValid)
        };
    txt.charCounter({
        target: div.find('.text-counter'), min: 30, max: 500, setIsValid: isValid
    });

Where the comment setup for the charCounter is set to maximum of 600:

var renderCommentForm = function(jForm, buttonText, showCancel, onSubmit)
{
    var isValid = false;
    var setIsValid = function(bool)
        {
            isValid = bool
        };
    var inputBox = jForm.find('textarea');
    inputBox.charCounter({
        min: 15, max: 600, setIsValid: setIsValid
    }).focus(function()
    {
        StackExchange.comments.tabCompleter.init($(this))
    });

Expect this to be , probably because one of the columns holding your custom off-topic reason doesn't have a length capable of accepting more than 500 characters.

  • This does seem to be the case for when the comment is initially made. It then becomes a 'normal' comment and, should I so desire, I can then edit the comment to go full-length. Yeah, it's not an end-of-the-world issue here, just a 'hmm, that's weird' one. – JonW Jun 17 '15 at 15:56
3

I am told that my comment is too long by 56 characters.

Ok, I know it's not the exact fix to your request, but what about:

Questions requesting recommendations for books/software/apps etc. would fall into the shopping request category and aren't suitable to a Q&A site. This is because there's no one correct answer, and any recommended items would soon be updated and replaced with newer/better versions making the best answers redundant. Therefore you're better off visiting our Chat site for such discussions, they're not suitable for this main site.

500 chars ;)

  • 1
    To which OP would reply 'What do you mean shopping request'? ;) – JonW Jun 17 '15 at 15:34
  • Ok you win :D I've had to change more, perhaps more than you want. However, looking at rene's comment, it seems it might be status-bydesign, so won't change, so you're going to have to work around it :) I'm sure you can reword yourself, was just giving the example really. – James Jun 17 '15 at 15:38
  • Yeah, it feels like butchering the grammar of a tweet to try to cram it into 140 characters! – JonW Jun 17 '15 at 15:44
  • 1
    Hi James! Did you forget the word "is" between "This" and "because" in your second sentence, or is that just me being too verbose? :) – Sue Saddest Farewell TGO GL Jun 17 '15 at 21:16
  • 1
    Hi Sue :) That was an unintentional mistake, well spotted. I trimmed it down but didn't want it that pithy! It also makes it exactly the 500 char limit too! – James Jun 17 '15 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .