Jump to content

Error in meta character counting In PS9.02


chipset

Recommended Posts

There is a problem with meta character counting in the products' SEO section. When they are in "English" (Latin script), they are counted correctly. When they are in Cyrillic, it counts all characters instead of symbols. Thus, this meta title with a length of 45 symbols is counted as 84: "Употребявано Wing крило KT Astro 2.0m2 с гик".

The same situation in short description: "Отлично състояние, неразличим от нов. Модел 2026г. Лекота, производителност и издръжливост са ключовите конструктивни параметри на крилото" - real 139, counted 374.

In PS8 was right.

p.s. Maybe these are not used, but the remaining ones!

Edited by chipset (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

This is a known type of issue: the counter is using byte length (or a wrong encoding/JS length method) for Cyrillic instead of counting characters. That’s why Cyrillic shows ~2–3× higher numbers, while Latin looks “correct”. It’s usually a back-office UI counter bug (JS), not the real saved value.

What to do (quick):

  • Update to the latest 9.0.x / 8.2.x patch
    • These counters have been fixed/changed across releases, so updating often resolves it.
  • Ignore the counter and validate the actual output
    • Check the front HTML source: what matters is the real <title> / <meta name="description">.
  • If you need a workaround now: override/fix the JS counter
    • The fix is to count Unicode code points (e.g. Array.from(text).length) instead of text.length/byte length.

If you tell me your exact PrestaShop version (8.2.x? 9.0.x?) and whether you use the new product page, I can point you to the file/override location for the counter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...