Skip to main content
Topic: ElkArte 1.1.9 (Read 7264 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: ElkArte 1.1.9

Reply #15

Quote from: badmonkey – Here's a bugz report (maybe). Attached image preview does not display on either site. Both use Attached Image Resize addon. This occurs using php 7.4 and 8.1. The attached images display properly once posted.
OK I'll take a look at that and try and determine why that is happening.  (Starting In 2.0, the attachment image resize is part of the core, no more addon)

Quote from: NetFlag – Is it possible to use the variant "Darktanion" (dev) under 1.1.9?
It will need adjustments for 1.1.9, but It should, probably, mostly, work.  You will see wrong borders or element padding issues in a few places, maybe a few other issues as well.

To try you would need to edit the default theme index.template.php file and change the theme_variants line to read 'theme_variants' => array('light', 'besocial', 'dark'),  You would then need to add the _dark css directory from 2.0 and under the 1.1.9 themes/default/css directory (where _light and _besocial are)  Then choose it in your profile. 



Re: ElkArte 1.1.9

Reply #18

Quote from: badmonkey – Here's a bugz report (maybe). Attached image preview does not display on either site. Both use Attached Image Resize addon. This occurs using php 7.4 and 8.1. The attached images display properly once posted.
Back to this .... While looking at this I found a couple of items that needed to be addressed.

First the addon needed to be updated to fully support 1.1.9, specifically support for webp (if you enable that) and better integration with the attachment drop area on the post screen. 

While looking at all of that, I noticed
 - That the transparency detection code could be improved a bit,
 - There was an issue in the post attachment area, specifically when you have the resize addon, and it did the resize, the space left line was not updated to reflect the smaller file ... so if you uploaded a 2M file that was reduced to 250k, you were still docked the 2M
- When using imagick, you may get an empty thumbnail when uploading an animated gif, and you may loose the animation of said gif

All that said, I'm not sure this addresses the problem you reported, but its steps in the right direction.

Here are the files, only use if on 1.1.9 ... replace the two core files and install the new version of the resize addon

Re: ElkArte 1.1.9

Reply #19

Many thanks for your work spuds!!  Unfortunately the preview still does not show?

Re: ElkArte 1.1.9

Reply #20

Time for some more info gathering so I can fix this !

Just to be sure, you are referring to the little thumbnail that appears (or should) in the status bar attachment zone.
Are you using GD or Imagick (just so I use the right one)
Are you using a custom theme?  If so I need to check if there are any edits missing from the package.
Any errors in the browser console?

Re: ElkArte 1.1.9

Reply #21

Quote from: Spuds – Time for some more info gathering so I can fix this !

Just to be sure, you are referring to the little thumbnail that appears (or should) in the status bar attachment zone.
Are you using GD or Imagick (just so I use the right one)
Are you using a custom theme?  If so I need to check if there are any edits missing from the package.
Any errors in the browser console?
Correct, the thumbnail by the status bar. The preview also fails in the editor if inlined in WYSIWYG mode. 

Both are available. Imagick is prioritized isn't it? 

The themes on both sites are default with custom css. 


Seems there could be a jquery issue at hand?  There are errors in the console log:


QuoteUncaught SyntaxError: Unexpected end of input (at jquery-ui-1.12.1.min.js:7:16012)


index.php:1          GET https://www.site.com/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_1_d38f307e2c04dddc371b0ef2a7082431;topic=4390 502

Uncaught SyntaxError: Unexpected end of input (at jquery-ui-1.12.1.min.js:7:16012)
manifest.json:27 Manifest: Line: 27, column: 1, Unexpected token.
7XHR finished loading: GET "<URL>".
jquery-3.6.0.min.js:2 XHR finished loading: POST "https://www.site.com/index.php?action=attachment;sa=ulattach;api;p7z2h7MgySPX=BAcLw6ANOAlB6FjIc5AstyKxrA5SnP40;board=2".
send @ jquery-3.6.0.min.js:2
ajax @ jquery-3.6.0.min.js:2
sendFileToServer @ dropAttachments.js?R119:122
(anonymous) @ dropAttachments.js?R119:538
setTimeout (async)
runAttachmentQueue @ dropAttachments.js?R119:534
handleFileUpload @ dropAttachments.js?R119:524
(anonymous) @ dropAttachments.js?R119:692
dispatch @ jquery-3.6.0.min.js:2
v.handle @ jquery-3.6.0.min.js:2
index.php:1          GET https://www.site.com/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_1_d38f307e2c04dddc371b0ef2a7082431;topic=4390 502
Image (async)
attr @ jquery-3.6.0.min.js:2
$ @ jquery-3.6.0.min.js:2
attr @ jquery-3.6.0.min.js:2
fileUploadedInterface @ dropAttachments.js?R119:423
onUploadSuccess @ dropAttachments.js?R119:390
(anonymous) @ dropAttachments.js?R119:166
c @ jquery-3.6.0.min.js:2
fireWith @ jquery-3.6.0.min.js:2
l @ jquery-3.6.0.min.js:2
(anonymous) @ jquery-3.6.0.min.js:2
load (async)
send @ jquery-3.6.0.min.js:2
ajax @ jquery-3.6.0.min.js:2
sendFileToServer @ dropAttachments.js?R119:122
(anonymous) @ dropAttachments.js?R119:538
setTimeout (async)
runAttachmentQueue @ dropAttachments.js?R119:534
handleFileUpload @ dropAttachments.js?R119:524
(anonymous) @ dropAttachments.js?R119:692
dispatch @ jquery-3.6.0.min.js:2
v.handle @ jquery-3.6.0.min.js:2

Re: ElkArte 1.1.9

Reply #22

Quote from: badmonkey – Both are available. Imagick is prioritized isn't it?
Yup ... it will choose Imagick over GD as the results are better.
Quote from: badmonkey – The themes on both sites are default with custom css.
That should not be a problem at all then.
Quote from: badmonkey – Uncaught SyntaxError: Unexpected end of input (at jquery-ui-1.12.1.min.js:7:16012)
That one is odd .. At first I thought it could be due to a bad json response from the server (in response to sa=tmpattach ... but its from jquery-UI which I don't think is normally loaded for the post page?  Could you provide me you list of addons so I can do some more digging?



Re: ElkArte 1.1.9

Reply #23

Also, setting aside that it appears its jquery-UI throwing the error, could you look at your network tab and see what response you are getting for tmpattach request?   just wondering if there is something in that response, like a server cors error or php error in the response itself? Or maybe you enabled webp, in which case the thumbnail would be a webp image and that is causing an issue.  Feel free to pm me a site and temp userid so I can see the dev console myself.
Last Edit: October 18, 2022, 09:21:22 am by Spuds

Re: ElkArte 1.1.9

Reply #24

Quote from: Spuds –
Quote from: badmonkey – Both are available. Imagick is prioritized isn't it?
Yup ... it will choose Imagick over GD as the results are better.
Quote from: badmonkey – The themes on both sites are default with custom css.
That should not be a problem at all then.
Quote from: badmonkey – Uncaught SyntaxError: Unexpected end of input (at jquery-ui-1.12.1.min.js:7:16012)
That one is odd .. At first I thought it could be due to a bad json response from the server (in response to sa=tmpattach ... but its from jquery-UI which I don't think is normally loaded for the post page?  Could you provide me you list of addons so I can do some more digging?


Here's an addon list:


Attachment Image Resize 1.0.7  
Bookmarks   2.5
ElkArte 1.1.2 patch 1.0
ElkArte 1.1.3 patch 1.1.3  
ElkArte 1.1.4 patch 1.1.4  
ElkArte 1.1.6 patch 1.0
ElkArte 1.1.7 patch 1.0
ElkArte 1.1.7 patch 1.0
ElkArte 1.1.8 patch 1.0
ElkArte 1.1.9 patch 1.0
Google Member Map   1.0.6  
Image Watermark 1.0
Lazy loading of images  0.0.2  
SimpleAds   1.0.3




Re: ElkArte 1.1.9

Reply #25

Quote from: Spuds – Also, setting aside that it appears its jquery-UI throwing the error, could you look at your network tab and see what response you are getting for tmpattach request?  just wondering if there is something in that response, like a server cors error or php error in the response itself? Or maybe you enabled webp, in which case the thumbnail would be a webp image and that is causing an issue.  Feel free to pm me a site and temp userid so I can see the dev console myself.
webp is enabled, though if memory serves it occurs when webp is disabled as well. A verfication test and update are in order.....

The network console does indicate a 502 error:

allow: GET, HEAD, POST
content-length: 552
content-type: text/html
date: Wed, 19 Oct 2022 00:22:50 GMT
server: nginx
:authority: bbs.zuwharrie.com
:method: GET
:path: /content?action=dlattach;sa=tmpattach;attach=post_tmp_777_b023f1c22944525f7e9f3b8e58e92446;topic=139287
:scheme: https
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cache-control: no-cache
cookie: Zuwharrie738=%5B777%2C%2205c27336b121b64491c00d800b07b24582c4f8143ec34ec29826ce6f14bb4964%22%2C1850919101%2C2%5D; PHPSESSID=9mat7d7qdmgvb6ffkc6156pr6v23g6j5qjmgbgl5clemnmhq3l6crk9vdjhmcitm
pragma: no-cache
referer: https://xxx.xxxxxxxx.com/content?action=post;topic=139287.0;last_msg=1369644
sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Last Edit: October 19, 2022, 08:41:43 am by Spuds

Re: ElkArte 1.1.9

Reply #26

OK, the previous statement is verified. The preview fails when webp support is disabled. Interestingly, the headers still indicated webp acceptance? webp is not in the allowed attachment extension field, either.


allow: GET, HEAD, POST
content-length: 552
content-type: text/html
date: Wed, 19 Oct 2022 00:31:57 GMT
server: nginx
:authority: bbs.zuwharrie.com
:method: GET
:path: /content?action=dlattach;sa=tmpattach;attach=post_tmp_777_017c4b85254e043a529f433d0de7f44c;topic=139287
:scheme: https
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cache-control: no-cache
cookie: Zuwharrie738=%5B777%2C%2205c27336b121b64491c00d800b07b24582c4f8143ec34ec29826ce6f14bb4964%22%2C1850919101%2C2%5D; PHPSESSID=9mat7d7qdmgvb6ffkc6156pr6v23g6j5qjmgbgl5clemnmhq3l6crk9vdjhmcitm
pragma: no-cache
referer: https://xxx.xxxxxxx.com/content?action=post;topic=139287.0;last_msg=1369644
sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Last Edit: October 19, 2022, 08:42:33 am by Spuds

Re: ElkArte 1.1.9

Reply #27

Quote from: badmonkey – OK, the previous statement is verified. The preview fails when webp support is disabled. Interestingly, the headers still indicated webp acceptance? webp is not in the allowed attachment extension field, either.
the webp in the headers is just the browser announcing what it supports.  Its similar to the accept-encoding header which lets the server know what compression methods it can handle gzip etc.   One could use the webp header to check if sending back a webp image was OK and if not quick transform the image to png or jpg.  I went the lazy route and let the admin choose support, figuring most browsers in the last 4 years support webp, and caniuse claims 97% support at this point.

OK back on task (I did the quick edit on your posts to remove the website just in case) ... I think the issue is with the watermark addon, it at least has some problems with 1.1.9, so hoping an update there will clear this up.   I'll post an updated package for that later today.

Re: ElkArte 1.1.9

Reply #28

OK, uninstall your old watermark addon, and then install this beauty!

Not sure if this will fix the issue you are having, but at least this version does run on 1.1.9 where as the previous did not .... so its progress!

Re: ElkArte 1.1.9

Reply #29

And just for completeness, and since I had to look, and since @emanuele45 is lazy ... here is an update to LazyLoading

The updates are pretty minor, but in 1.1.9 avatars and attachments have the loading="lazy" attribute on them, so the browser takes care of the lazy loading (enabled browsers that is ~ 90% are) so the change prevents the addon from changing those.  The browser is much "smarter" about what it loads, its not just waiting for it to enter the viewport (as this addon does) which provides a better user experience.

Also this does not require the emulation to install and updated the script to the latest (although the changelog shows no real change but anyway ..)