Bug #23691 Bug Fixed

Template Routes don’t work as described in the EE-documentation

Version: 4.3.3 Reporter: timoteus

The bug as described in https://expressionengine.com/support/bugs/21633/template-routes-with-static-segments-and-require-all-set-to-no-error and https://expressionengine.com/support/bugs/23046/template-route-issue still still exists.

The EE-documentation in https://docs.expressionengine.com/latest/urls/template_routes.html#require-all-variables states:

Require all Variables If set to “yes” all segments defined in your Template Route must be contained in a URL in order for it to match. For example in this Template Route:
/name/{first_name}/{last_name}/{suffix}/{page:pagination}
If “Require all Variables” is set to “No” (the default) then only static segments are required. Any or all of the non-static segments may be omitted. Thus all of the following URLs will match:
/name/Enrico/Fermi/III

/name/Enrico/Fermi

/name/Enrico

/name/III

/name/P5

/name
If all segments are required only the first URL will match. Neither setting would allow this route to match:
/not_name

Kevin is talking about design flaws within the EE-code. But why does the documentation say that it is working?

Either fix it or update the documentation, please?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases