XF 2.2 Attachment button not working when creating/editing messages

kitjarik

New member
Hello. I'm having issues with attaching files.

When I insert images with the Insert Image button on top of the editor, everything works fine.

But when I click the "Attach files" at the bottom, it shows the progress bar and uploads the file, but the thumbnail is empty and the file isn't attached when I save the post:

Screenshot 2021-01-28 at 12.04.23.png

The left file was attached using the button — empty and will disappear when I save the post. The right one is the same file, attached using the Insert Image button.
What could be the problem?
 

Brogan

XenForo moderator
Staff member
Impossible to say from a screenshot.

Are there any console messages/errors related to the blank image?

How large is the file which is being attached?
 

Hotfix

Active member
Hello. I'm having issues with attaching files.

When I insert images with the Insert Image button on top of the editor, everything works fine.

But when I click the "Attach files" at the bottom, it shows the progress bar and uploads the file, but the thumbnail is empty and the file isn't attached when I save the post:

View attachment 245035

The left file was attached using the button — empty and will disappear when I save the post. The right one is the same file, attached using the Insert Image button.
What could be the problem?

I'm experiencing the exact same issue and it's driving me and the new users of my forum nuts.

Did you find a solution to this?
 

Hotfix

Active member
Error rendering template public:lightbox.less

Server error log



  • XF\CssRenderException: Error rendering template public:lightbox.less: ParseError: Unexpected input in public:lightbox.less on line 3101, column 8 (on or near line 3101)
  • src/XF/CssRenderException.php:87

  • Generated by: Unknown account
  • Feb 13, 2021 at 11:15 PM


Stack trace​


3098 | }
3099 | max-width: 95%;
3100 |
3101| border: 1px solid mix(rgb(230, 214, 236), , 65%);
3102 | .m-dropShadow(0, 3px, 5px, 0, .3);
3103 |
3104 | li
------------

#0 src/XF/CssRenderer.php(416): XF\CssRenderException::createFromLessException(Object(Less_Exception_Chunk), 'public:lightbox...', '// Note that th...')
#1 src/XF/CssRenderer.php(350): XF\CssRenderer->renderToCss('public:lightbox...', '// Note that th...')
#2 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate('public:lightbox...', NULL)
#3 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#5 css.php(30): XF\CssWriter->run(Array, 2, 4, '70c6f92ce21928d...')
#6 {main}

-------------

Previous Less_Exception_Chunk: ParseError: Unexpected input in anonymous-file-158.less on line 3101, column 8
3099| max-width: 95%;
3100|
3101| border: 1px solid mix(rgb(230, 214, 236), , 65%);
3102| .m-dropShadow(0, 3px, 5px, 0, .3);
3103|
3104| li - src/vendor/oyejorge/less.php/lib/Less/Parser.php:677
#0 src/vendor/oyejorge/less.php/lib/Less/Parser.php(621): Less_Parser->GetRules(NULL)
#1 src/vendor/oyejorge/less.php/lib/Less/Parser.php(449): Less_Parser->_parse()
#2 src/XF/CssRenderer.php(412): Less_Parser->parse('// Note that th...')
#3 src/XF/CssRenderer.php(350): XF\CssRenderer->renderToCss('public:lightbox...', '// Note that th...')
#4 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate('public:lightbox...', NULL)
#5 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#7 css.php(30): XF\CssWriter->run(Array, 2, 4, '70c6f92ce21928d...')
#8 {main}


Request state​


array(4) {
["url"] => string(283) "/css.php?css=public%3Acolor_picker.less%2Cpublic%3Aeditor.less%2Cpublic%3Alightbox.less%2Cpublic%3Anode_list.less%2Cpublic%3Anodeicon.less%2Cpublic%3Ashare_controls.less%2Cpublic%3Asiropu_chat.less%2Cpublic%3Aextra.less&s=2&l=4&d=1613258123&k=70c6f92ce21928d7eda3400c1cdf2eb023c314f3"
["referrer"] => string(21) "https://mydomainxyz.com/"
["_GET"] => array(5) {
["css"] => string(176) "public:color_picker.less,public:editor.less,public:lightbox.less,public:node_list.less,public:nodeicon.less,public:share_controls.less,public:siropu_chat.less,public:extra.less"
["s"] => string(1) "2"
["l"] => string(1) "4"
["d"] => string(10) "1613258123"
["k"] => string(40) "70c6f92ce21928d7eda3400c1cdf2eb023c314f3"
}
["_POST"] => array(0) {
}
}
 
Top