URL builder builds wrong URL

Hi,

according to the documentation, the URL Manager component is responsible both for routing and URL building. My current URL Manager configuration is the following:


'urlManager' => [

    'enablePrettyUrl' => true,

    'showScriptName' => false,

    'suffix' => '.html',

    'rules' => [

        'dashboard' => 'site/index',


        '<controller:\w+>/create' => '<controller>/create',

        '<controller:\w+>s' => '<controller>/index',


        '<controller:\w+>/update/<url:\w+>' => '<controller>/update',

        '<controller:\w+>/delete/<url:\w+>' => '<controller>/delete',

        '<controller:\w+>/<url:\w+>'        => '<controller>/view',

    ],

]

My main purpose to create these rules was to make URLs, which contain the sanitized titles of posts instead of their numerical IDs. These sanitized titles are stored in the database.

Now, routing works fine. The problem is, that URL building doesn’t.

For example, if I point to

all of them works.

However, on the Gii-generated pages, the buttons are linked to URLs like these:

What would be the problem here? Could you, please, offer me a solution?