steirico / kirby-plugin-custom-add-fields

Custom fields for Kirby's add dialog.
MIT License
36 stars 4 forks source link

"No route found for path" #28

Closed nilshoerrmann closed 4 years ago

nilshoerrmann commented 4 years ago

After installing this plugin, I get the following error when trying to access the create dialog:

Bildschirmfoto am 2020-09-23 um 11 00 38

{
    "code": 404,
    "details": [],
    "exception": "Exception",
    "file": "/example/kirby/src/Http/Router.php",
    "key": null,
    "line": 154,
    "message": "No route found for path: \"pages/example/blueprints/add-fields\" and request method: \"GET\"",
    "route": null,
    "status": "error"
}

It doesn't matter if there are custom add fields or not. We are using Kirby 3.4.3.

nilshoerrmann commented 4 years ago

It seems like the API URL is outdated and it should be:

'pattern' => [
    'site/blueprints/add-fields',
    'pages/(:any)/blueprints/add-fields',
],

instead of:

'pattern' => [
    'site/children/blueprints/add-fields',
    'pages/(:any)/children/blueprints/add-fields',
],
steirico commented 4 years ago

Thanks for the report and debug effort.

Your are absolutely right. There is a breaking change from Kirby 3.4.2 to 3.4.3 introduced by https://github.com/getkirby/kirby/commit/eac50cc2d90731675e4d8cb0d1b43f111b582e14.

I'll provide the fix asap.

nilshoerrmann commented 4 years ago

PR #31 should fix this.