1

I have 3 templates in a template group

Template Group

/customer-service
/customer-service/expert-tip
/customer-service/expert-tips

I want to use the second template to display specific channel entries like so, with the third segment being an entry ID:

/customer-service/expert-tip/{tip:alpha_dash}

However, when I do this, I can't access any of these templates. They all return an ERR_CONTENT_DECODING_FAILED error in Chrome.

Templates Routes are enabled in my global settings and I also have this expert-tip template set to require all 3 segments.

Any idea what is causing this?

EDIT I've tested the URLs in Firefox, Safari, and Chrome and the template routes work for everything except normal Chrome. Even Incognito Mode works for Chrome.

EDIT2

Message:  preg_match_all(): Compilation failed: group name must start with a non-digit at offset 35
Filename: libraries/Template_router.php
Line Number: 56

2 Answers 2

0

It usually happens when your HTTP request's headers claim that the content is gzip encoded when it really isn't. Turn off the gzip encoding setting (or make sure the content is in fact encoded).

1
  • Did that, now working on another error. Commented Dec 7, 2015 at 16:10
0

The first problem was that my output settings had GZIP encoding enabled. After disabling GZIP encoding, the page rendered with the error I mentioned in EDIT2.

After seeing this error, I found this thread on Ellis Lab's website: https://support.ellislab.com/bugs/detail/20493/custom-route-manager-rule-throwing-preg_match_all-warning

I followed the instructions in that solution, re-submitted my custom template routes and the problem pages loaded with no errors thrown.

1
  • You should have upgraded to the latest version, or at least mentioned the version you're on. Running into a bug that's since been fixed is ... well, unfortunate.
    – Ingmar
    Commented Dec 7, 2015 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.