MimeTypes-Link-Icons icon indicating copy to clipboard operation
MimeTypes-Link-Icons copied to clipboard

Plugin adds “a[data-mtli […]” underneath files on custom post type

Open x06designs opened this issue 2 years ago • 5 comments

I installed MimeTypes Link Icons on one of my websites. Unfortunately there seems to be a bug. After adding two files to a custom post type, there is a line of text added “a[data-mtli~=”mtli_filesize1,37MB”]:after {content:” (1,37 MB)”}a[data-mtli~=”mtli_filesize1,73MB”]:after {content:” (1,73 MB)”}”. How can I get rid of this? The text doesn't appear on all pages with files - therefore, I unfortunately don't know what is responsible for the error to appear.

I am using the latest version of WordPress with the Jupiter X theme and Elementor.

x06designs avatar Jun 13 '22 05:06 x06designs

do you have link? I can't replicate

eagerterrier avatar Feb 26 '24 13:02 eagerterrier

I fixed the bug in my pending pull request. After updating to your newest version, the error reappeared. I can't provide a link, as it's a closed members website, but I can provide a screenshot: image

x06designs avatar Feb 29 '24 09:02 x06designs

hey @x06designs - thanks for this. Couldn't take all the changes, so cherry picked and gave you credit in the credit/contributors section.

The echo line looked weird, so I didn't change it, thinking earlier changes would have worked on this issue (such as data-mtli rather than rel)

however, if that's not the case, then I've put in the echo line into latest version of plugin as I tested it on my live WP site and it seems fine. Odd that it didn't work before. ¯(°_o)/¯

Anyway, v 3.2.18 has just gone out. Let me know if that fixes the issue.

eagerterrier avatar Feb 29 '24 10:02 eagerterrier

Unfortunately I still see the weird addition after the files: a[data-mtli~="mtli_filesize1,37MB"]:after {content:" (1,37 MB)"}a[data-mtli~="mtli_filesize1,73MB"]:after {content:" (1,73 MB)"} a[data-mtli~="mtli_filesize1,37MB"]:after {content:" (1,37 MB)"}a[data-mtli~="mtli_filesize1,73MB"]:after {content:" (1,73 MB)"} a[data-mtli~="mtli_filesize1,37MB"]:after {content:" (1,37 MB)"}a[data-mtli~="mtli_filesize1,73MB"]:after {content:" (1,73 MB)"} a[data-mtli~="mtli_filesize1,37MB"]:after {content:" (1,37 MB)"}a[data-mtli~="mtli_filesize1,73MB"]:after {content:" (1,73 MB)"} a[data-mtli~="mtli_filesize1,37MB"]:after {content:" (1,37 MB)"}a[data-mtli~="mtli_filesize1,73MB"]:after {content:" (1,73 MB)"} (same as in my previous screenshot).

I am running the latest version (3.2.19) and the website uses the Elementor page builder. The console doesn't show any errors, so I have no clue why this data-mtli texts appear.

x06designs avatar Mar 27 '24 20:03 x06designs

hey @x06designs - thanks for this. Couldn't take all the changes, so cherry picked and gave you credit in the credit/contributors section.

The echo line looked weird, so I didn't change it, thinking earlier changes would have worked on this issue (such as data-mtli rather than rel)

however, if that's not the case, then I've put in the echo line into latest version of plugin as I tested it on my live WP site and it seems fine. Odd that it didn't work before. ¯(°_o)/¯

Anyway, v 3.2.18 has just gone out. Let me know if that fixes the issue.

I found the problem. All of my posts, that had a link to a file in the content area, had some artifacts (it looked like a video icon in the WYSIWYG-editor). After deleting it the whole data-mtli part is gone. The artifacts must've been automatically added from a previous version.

x06designs avatar Apr 10 '24 13:04 x06designs