Forum

Thread tagged as: Question, Problem, Runway

Accents in slug

Hi,

I'm using Perch Runway 2.8.2.

I've got a slug field in a Collection template, which is created from the title.

Many of the titles have accents. On my development site, the accents are correctly changed to relevant characters (e.g. ó to o). However, on my staging site (different server), the characters with accents are being ignored when the slug is created (e.g. adquisición becomes adquisicin).

Any idea why this might be happening on one server but not the other?

Thanks,

Rob

Robert Chambers

Robert Chambers 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Check to see if you have the PHP transliterator extension installed. That's where the magic comes from.

Hi Drew,

I've added the translit extension now, but still seeing "Transliteration functions: No" in the Perch diagnostics.

Is there anything else I need to do?

I've tested transliterate() and it's working on a test script.

Thanks,

Rob

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's odd. What happens when you create a new slug?

Characters with accents are still be ignored when the slug is created.

From the diagnostics, these are the extensions installed (translit is the one I installed):

Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, filter, ftp, gd, hash, iconv, SPL, json, mbstring, mcrypt, session, mysql, standard, Phar, posix, Reflection, mysqlnd, SimpleXML, sockets, imap, tokenizer, xml, xmlreader, xmlwriter, cgi-fcgi, timezonedb, OAuth, PDO, pdo_sqlite, pdo_mysql, translit

But getting this: Transliteration functions: No

Drew McLellan

Drew McLellan 2638 points
Perch Support

I would have expected that to work. Does it look the same on the server that is working?

Have you restarted whatever process is running PHP?

I restarted the server, but still no luck.

The extensions are different on the development server, which is working ok:

Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, mysql, mysqli, session, PDO, pdo_sqlite, standard, posix, Reflection, Phar, SimpleXML, soap, sockets, exif, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, gettext, mcrypt, yaz, pgsql, pdo_pgsql, pdo_mysql

And it does say: Transliteration functions: Yes

Is there a different PHP extension I could try?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Hi Drew,

I installed the intl extension and now it's working fine.

Thanks,

Rob

Drew McLellan

Drew McLellan 2638 points
Perch Support

Great. That's useful to know, thanks.