Forum

Thread tagged as: Problem, Runway, Blog

Some uncommon characters like + or = in postURL can break slug and cause 404 err...

Hi,

I've got a small bug to report which I noticed in Blog App today.

Several unique characters could show up in a postTitle and aren't stripped and cause a 404 error.

The character I first saw it in was + sign. The = sign also seems suspect, the ~ and ^ also throw the same error. &, quotes and single quotes all work fine.

I have an article in a Runway collection that I was using to test a blog post with titled Environment + Public Health: The New Sustainability

When I use it in a collection the slug gets turned to this: environment-public-health-the-new-sustainability which works great. No 404.

However, in the Blog App the postSlug turns to this 2015-12-09-environment-+-public-health-the-new-sustainability

I've tried test urls like this This & That = This + That, That & This. No Really “Its” This or ‘That’ which gave me a slug of 2015-12-09-this-that-=-this-+-that-that-this-no-really-its-this-or-that

I've tried urlify="true" but it didn't strip or change the postSlug and I haven't tried to change anything in the blogslug routing_tokens.

SUMMARY INFORMATION

Perch Runway: 2.8.18, PHP: 5.5.26, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.18), assets (2.8.18), categories (2.8.18), collection_8 (2.8.18), perch_blog (5.0), collection_4 (2.8.18), perch_events (1.9.2), perch_kraken (1.0), collection_1 (2.8.18), collection_6 (2.8.18), collection_5 (2.8.18), perch_podcasts (1.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_events', 'perch_podcasts', 'perch_blog', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/scottgruber/git/ioes-site/perch
PERCH_CORE: /Users/scottgruber/git/ioes-site/perch/core
PERCH_RESFILEPATH: /Users/scottgruber/git/ioes-site/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 256M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: dev.environment.ucla.edu:8888
DOCUMENT_ROOT: /Users/scottgruber/git/ioes-site
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Scott Gruber

Scott Gruber 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have transliteration enabled?

Not that I'm aware of. Is it a possible config setting?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

It's the PHP transliterator extension, not part of Perch.

I found out that its isolated to my local dev environment. No problem on the server. So issue can be closed while I check out my desktop to see what I did.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

See where your local dev environment does not match the live one, Compare your Diagnostics Reports.

Thank you much. In diagnostics on my local computer Transliteration functions: Yes.

On production server it says Transliteration functions: No.

Now to see how that may snuck into El Capitan. Maybe b/c of Chinese keyboard. This should be a puzzler.