Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Error Message for Comments > max_length #107

Closed
ephes opened this issue Oct 15, 2023 · 2 comments
Closed

Missing Error Message for Comments > max_length #107

ephes opened this issue Oct 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ephes
Copy link
Owner

ephes commented Oct 15, 2023

If you post a comment that is longer than 3000 characters, the post form just does not work. Fluentcomments returns a response like this:

{
    "success": false,
    "action": "post",
    "errors": {
        "comment": "\n    \n        <span id=\"error_1_id_comment\" class=\"invalid-feedback\"><strong>Bitte sicherstellen, dass der Wert aus h\u00f6chstens 3000 Zeichen besteht. (Er besteht aus 3012 Zeichen.)</strong></span>\n    \n\n"
    },
    "object_id": "125",
    "use_threadedcomments": true
}

But no error message is shown.

@ephes ephes self-assigned this Oct 15, 2023
@ephes ephes added the bug Something isn't working label Oct 15, 2023
@ephes
Copy link
Owner Author

ephes commented Oct 15, 2023

Hmm, the error message is received by ajaxcomments.js and processed by the commentFailure function. It's even added to the DOM:

<span class="js-errors">
        <span id="error_1_id_email" class="invalid-feedback"><strong>Gib eine gültige E-Mail Adresse an.</strong></span>
</span>

But no error message is shown, still.

@ephes
Copy link
Owner Author

ephes commented Oct 15, 2023

Aha! invalid-feedback has display:none somehow. Just fix it in cast.css? But now I have to touch all bootstrap based templates 😕. This is odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant