WPIntell

Source evidence

First transliterated word is lost

Clean Image Filenames · support · 2022-06-01T22:21:00+00:00

complaintsentiment
mediumseverity
0.93relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 26 rows with source links

23.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

20 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
spytzo unresolved
Hi there and thank you for such a useful plugin! I have a small issue. The transliteration trims the first word of the title: π.χ. “καταστατικό αναδοχής παιδιού” becomes “anadochis-paidioy” which means that the first word “katastatiko” was completely lost in transliteration (pun indented). Any idea how to handle that? Wishing you all the bets Hi! Thanks for using the plugin! It seems weird that an entire word would be trimmed from the filename, and I honestly have no idea why. The only trimming that is done is hyphens (-) at the beginning and end of filenames, for example -my-filename-.jpg would be trimmed to my-filename.jpg. Does that give you any clues? 🙂 I am no PHP developer myself and I also feel weird because the code is so well documented that even I can understand what is going on per step. I am guessing that the only way that a whole word is deleted is either on line 478 (Remove characters that are not a-z, 0-9, or – (dash)) or on line 481 (Remove multiple dashes in a row). This could be like, for some reason the whole first word is transformed into dashes and then multiple dashes are replaced with only one. I am on SiteGround running their version of Ultrafast PHP – version PHP 7.4.29. Could that help as well? This reply was modified 3 years, 12 months ago by spytzo . I renamed an image/jpeg file to καταστατικό αναδοχής παιδιού and uploaded it to my local test site. The plugin converted the filename to katastatiko-anadochis-paidioy.jpg. I guess this is correct since the first word is still there. I guess if the entire first word is deleted it would be because the core WordPress function remove_accents() can’t handle the characters in the first word. However, on line 469, some characters are replaced that are not handled well or at all by the core WordPress function remove_accents(), before the remove_accents() function is used. All characters in the first word are defined in the array starting at line 265, so they should all be translated. Which is what I am getting when I test it out. Same thing, I spun out a fresh Local WP installation running on WordPress 6.0 and theme Twenty Twenty-Two with only your plugin installed and activated and everything went smoothly. (nginx, PHP 7.4.1, MySQL 8.0.16). I will do some more tests on my original installation and will get back with more information about this weird little bug 🙂

Comments

4 shown
Emil Gustafsson 2022-06-02T07:29:00+00:00

Hi! Thanks for using the plugin! It seems weird that an entire word would be trimmed from the filename, and I honestly have no idea why. The only trimming that is done is hyphens (-) at the beginning and end of filenames, for example -my-filename-.jpg would be trimmed to my-filename.jpg. Does that give you any clues? 🙂

spytzo 2022-06-02T11:19:00+00:00

I am no PHP developer myself and I also feel weird because the code is so well documented that even I can understand what is going on per step. I am guessing that the only way that a whole word is deleted is either on line 478 (Remove characters that are not a-z, 0-9, or – (dash)) or on line 481 (Remove multiple dashes in a row). This could be like, for some reason the whole first word is transformed into dashes and then multiple dashes are replaced with only one. I am on SiteGround running their version of Ultrafast PHP – version PHP 7.4.29. Could that help as well? This reply was modified 3 years, 12 months ago by spytzo .

Emil Gustafsson 2022-06-03T08:41:00+00:00

I renamed an image/jpeg file to καταστατικό αναδοχής παιδιού and uploaded it to my local test site. The plugin converted the filename to katastatiko-anadochis-paidioy.jpg. I guess this is correct since the first word is still there. I guess if the entire first word is deleted it would be because the core WordPress function remove_accents() can’t handle the characters in the first word. However, on line 469, some characters are replaced that are not handled well or at all by the core WordPress function remove_accents(), before the remove_accents() function is used. All characters in the first word are defined in the array starting at line 265, so they should all be translated. Which is what I am getting when I test it out.

spytzo 2022-06-06T11:22:00+00:00

Same thing, I spun out a fresh Local WP installation running on WordPress 6.0 and theme Twenty Twenty-Two with only your plugin installed and activated and everything went smoothly. (nginx, PHP 7.4.1, MySQL 8.0.16). I will do some more tests on my original installation and will get back with more information about this weird little bug 🙂