Cannot reproduce Message is too long error when pasting image into editor

Affected version
2.2.3

Mr Lucky

Well-known member
I got an error posting an attachment here:

See here: https://xenforo.com/community/threa...oro-2-x-by-addonslab-paid.143075/post-1499133

In that case the message seemed to post OK, but after it was posted, the image didn't show and the link is dead.

Then I tried again in the same thread and got this while trying to post the image. (Message is not too long, it's just a screenshot)


screenshot-2021-02-11-at-16-31-24-png.246133
 

Mr Lucky

Well-known member
It was a screenshot, attached by drag and drop. Firefox 85.0.2 Mac

Just tried again in the same thread and it was OK.

I'll try it here:


Screenshot 2021-02-11 at 16.21.21.png
 

Chris D

XenForo developer
Staff member
No. It isn't a server error. It's an error about the message content being too long.

This is likely caused by the image being pasted not as image data, but instead as a data encoded URI inside an IMG tag meaning the message length of 10,000 (or whatever we have it set to) being exceeded.

Hence the questions about the attachment specifically, the browser and how it was being attached.
 

PASS

Well-known member
No. It isn't a server error. It's an error about the message content being too long.

This is likely caused by the image being pasted not as image data, but instead as a data encoded URI inside an IMG tag meaning the message length of 10,000 (or whatever we have it set to) being exceeded.

Hence the questions about the attachment specifically, the browser and how it was being attached.

In my situation (and the members who have reported it to me), the image is being uploaded, then inserted into the post. It looks fine but after the message is posted, I get exactly this.

the message seemed to post OK, but after it was posted, the image didn't show and the link is dead.

It happens on the forum and in PMs. The browser is Chrome for me. I will check with the members to see what they are using.
 

Chris D

XenForo developer
Staff member
Unless you're getting the "The submitted message is too long" error, it's likely to be different. And if you can't reproduce it here then it's likely something specific to your site.

So for now you'd be better off posting your own troubleshooting thread.
 

Mike

XenForo developer
Staff member
It may be unrelated, though actually now that I think about it, it could be related if the attachment actually failed to upload. Based on the initial screenshot, that doesn't seem to be the case (as there's an "insert" button on the attachment), in which case it would be a separate issue. I'd guess it's also browser specific as well -- you mention Firefox and I do recall FF using super long data URIs when pasting images into an RTE, which would fit with this behavior.

Unfortunately, it may be difficult for us to fix if we can't (consistently) reproduce it.
 

Ernomies

Member
This one is a nightmare. I usually paste images by copying it or part of the image with WIN+SHIFT+S combination and I get this error all the time. Sometimes it works when I refresh the page and try again.
 

Mike

XenForo developer
Staff member
I wasn't able to reproduce this, at least after the upload completes, though perhaps there's some situation where the upload isn't triggered. Does the image show up as an attachment?

What browser are you using?
 
Top