MetaModels / core

MetaModels Core Module
GNU Lesser General Public License v3.0
96 stars 42 forks source link

[2.3] Broken filter url builder #1497

Closed dmolineus closed 1 year ago

dmolineus commented 1 year ago

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment - check Contao Manager or use composer show)

Key Value Comments
PHP version: 8.1.16
Contao version: 4.13.16
MetaModels version: 2.3@dev
Installed MetaModels packages:
DCG version: 2.3@dev

Issue description

When using the new routing MetaModels breaks even though #1492 is marked as closed.

Steps to reproduce

  1. Given a MetaModels list
  2. The FilterUrlBuilder tries to retrieve the route information from the current request. In the list controller the _route attribute is not set. The main request has to be used
  3. Given a fragment foo/bar the filter url build tries to set a slug bar=null. This breaks because a string value is required

Describe the behaviour of the application

UnkownRouteNameException or type error is thrown.

zonky2 commented 1 year ago

Fixed in MM 2.3

Note: On the 40*-pages, an MM list can be output but no URLs can be created, e.g. for pagination, filtering or sorting - Contao prevents routing to this page type.