EllisLab text mark

This is an archived forum and may no longer be relevant. The active forums are here.

Advanced Search
Odd problem with broken URLs and no headers
Posted: 19 March 2012 08:08 AM
Joined: 2009-02-20
151 posts

Having an odd problem with EE URLs!

Normal stat of play are URL’s like this:

<a href="http://www.domain.com/template_group/template/url_title/">http://www.domain.com/template_group/template/url_title/</a>

<a href="http://www.domain.com/template_group/c/category_name/">http://www.domain.com/template_group/c/category_name/</a>

Using conditionals in “template” easy to deal with requiring entries and 404’s.

However, due to some errant markup in some sites linking in, URLs like the following are being hit where the anchor text is truncated but the active link is also directing towards the truncated URL:

<a href="http://www.domain.com/template_group/.../url_title/">http://www.domain.com/template_group/.../url_title/</a>

The url_title is valid, but the “template” is replaced by ‘...’ so this URL is processed by template/group/index rather than the “template”. As a result, EE returns the markup but with no headers so nothing is rendered even though the source code shows the markup.

What’s the best way to go about stopping this happening (without being too specific to the ... case) but still allow regular scenarios to work (including any pagination):

<a href="http://www.domain.com/template_group/">http://www.domain.com/template_group/</a>
<a href="http://www.domain.com/template_group/c/category_name/">http://www.domain.com/template_group/c/category_name/</a>
Posted: 20 March 2012 10:20 AM   [ # 1 ]
Joined: 2009-02-20
151 posts

Was running a little slow yesterday. It was a simple:

(segment_2!=="" && segment_2!=="c")

Wish there was a way without using a conditional in the template though.