0

I have an established site that was working just fine, but following a point-upgrade of EE (3.5.6 to 3.5.9) template routes that include a pagination term have all stopped working. I am mystified as to what is going on - maybe someone can suggest either a fix or a way to find out what is going on...

I have several template routes of the form /resources/category/{page:pagination} segments=no.

Currently any two-segment URL that would match this type of route (e.g. /resources/public-sector) goes to a 404. Identical URLs with a pagination term (e.g. /resources/public-sector/P5) work as they should.

If I send a URL that has a random third segment to the route (e.g. /resources/public-sector/stuff) the route goes to a 404 (correctly).

However, if I send a URL that has a third segment that has the form of a pagination term, but a lower case letter (e.g. /resources/public-sctor/p7) the route returns the opening page (what I should have got when there is no third segment).

I realise that with cleverness I could use a single route for all the various categories, but for various reasons all the various categories have their own route (so one for /resources/public-sector, a similar but separate one for /resources/presentations etc.) - and this behaviour is replicated across all of them.

Does anyone know what is going on here? Anyone seen it before?

Thanks alot for any help on this. FWIW It looks a lot like the unresolved issue in this thread.

1

This turned out to be a bug, which appears to have been around since 3.4.0.

Temporary fix ℅ Ellis Labs is to replace the static segment 2 element with regex to achieve same end: no idea why it works, but it does. So, for example, to get the example route from question to work, you need to modify it as follows:

/resources/{seg_2:regex[(public\-sector)]}/{page:pagination}

Posting answer here in case it is useful for someone else.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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