Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Problem with Pipe Symbol in Page Titles

Fehler
Minted
Posted on Mar 10, '07 at 09:23 am

Mint appears to have issues with page titles using the pipe (vertical bar) symbol. On one of the sites we’re developing, web page titles are configured as follows:

Publishing Company | Artist Name | Release Name

For example:

Fallt Publishing | Fehler + Fairchild Semiconductor | 100 Days [Iraq Conflict 20.05.06 - 27.08.06]

As this stands, Mint does not record these pages as page views, thereby dropping a lot of our page views completely. Worrying. However, if we change the above page title to this:

Fallt Publishing | Fehler + Fairchild Semiconductor » 100 Days [Iraq Conflict 20.05.06 - 27.08.06]

i.e. replace the second ‘|’ with a ‘»’ it works fine. It seems odd that the ‘|’ is causing this problem. Does this mean we need to alter all the page titles in the site? I hope not!

  1. This would incur a lot of work, hundreds and hundreds of pages; and

  2. More importantly, our client’s branding has always used pipe symbols as part of their print look and feel.

We’ve tried escaping the ‘|’ and hard coding it in HTML, both to no avail.

Any suggestions - or better, solutions - welcome.

Christopher @ Fallt (www.fallt.com)

Fehler
Minted
Posted on Mar 10, '07 at 10:44 am

I’ve just spoken with Shaun who suggests this may be “caused by an overzealous mod_security setting”. He suggests adding the following to an .htaccess file in [the] Mint directory:

‹IfModule mod_security.c›
SecFilterEngine Off
SecFilterScanPOST Off
SecFilterCheckURLEncoding Off
‹/IfModule›

I’ve tried this, but it throws up an error in Mint: “Could not find Mint installation.”

Any suggestions welcome. Clearly there’s an issue here. Using more than one pipe in a page title is not uncommon, this may well be affecting more than just this website.

Try using

edit: heh, Markdown parses the code…

&_#124;

without the underscore

Fehler
Minted
Posted on Mar 10, '07 at 11:50 am

I’ve already tried this, see my comment above:

We’ve tried escaping the ‘|’ and hard coding it in HTML, both to no avail.

Any other suggestions?

Turn on detailed error reporting in PHP and see if Mint spews out some kind of error or warning.

Also could be a bug in the Javascript that collects the data, you can add some breakpoints in a js debugger and have a look.

Fehler
Minted
Posted on Mar 11, '07 at 10:06 am

Many thanks to Shaun who pitched in with assistance whilst at the front lines at SXSW. It’s possibly worth flagging up the solution here lest anyone else find this as issue.

We solved the problem by placing an .htaccess file in the Mint directory with the following lines:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

This solved the problem and our stats. have gone up considerably since then. If you use more than one pipe symbol (‘|’) in your page titles you may need to implement the above.

Looking at our raw non-Mint monthly report (and I know it will be somewhat inflated due to spiders, etc.) we’re on 122,062 page views since our January, 1 re-launch. Because of the issue with the pipes in the page titles Mint was reporting it around 12,700.

Big difference.

That said, I’m happy to report everything’s functioning fine now and would like to thank Shaun for his assistance.

Fehler
Minted
Posted on Mar 11, '07 at 10:07 am

Also, Tomislav, Shaun pointed out it’s nothing to do with a bug in the Javascript.

Fehler
Minted
Posted on Apr 24, '07 at 04:03 pm

I’ve since emailed Shaun about this again (24.04.07) as I suffered from this problem again on another site today (it must be an age thing, I’m obviously too old to recall all this advice!).

Anyway, if you’re using more than one pipe in your page titles either add the above .htaccess file or, if you’re hosted with Dreamhost, you can disable Extra Web Security. Both will result in your pages being recorded to the database again.

I’ve currently disabled Extra Web Security as a test. If anyone thinks this is a mistake and I should go down the .htaccess route please do let me know via the forum.

Thanks and hopefully this advice helps.

SDJL
Minted
Posted on Apr 25, '07 at 06:05 am

Disabling extra web security will most likely be turning off mod_security, which the above .htaccess code does just inside the mint directory.

It would probably be advisable to use the .htaccess code as this only affects the mint directory and not the whole of your website structure.

David

You must be logged in to reply. Login above or create an account