RolandDreger / kirby-data-importer

Kirby 3 plugin for data import and generating subpages
MIT License
12 stars 0 forks source link

Cannot select data file #1

Open clivewalker opened 2 years ago

clivewalker commented 2 years ago

I'm using Kirby 3.6 and I'm getting an error message as follows when I try and choose my .csv file.

No route found for path: "null" and request method: "GET"

What am I missing here?

RolandDreger commented 2 years ago

With Kirby 3.6 the backend architecture for the Panel has fundamentally changed. (see here) I strongly suggest that this is the reason for your error message.

andreasfehn commented 2 years ago

Hi Roland, I am running into the same problem, but still using Kirby 3.5.

I followed the installation guide by download the zipfile and extract it into the plugins folder (then renamed to "data-importer"). Within my desired blueprint file I placed the following options: import_data: . . type: import_data . . subpage_section: "items" . . subpage_template: "item" . . subpage_status: "unlisted" . . title_key_array: ["first_name","last_name"]

When I try to select a file I also get the same error message No route found for path: "null" and request method: "GET"

Edit: The error shows up also in the log: XHR: GET https://my-domain.local/api/null?page=0 Object { status: "error", message: "No route found for path: \"null\" and request method: \"GET\"", code: 404, exception: "Exception", key: null, file: "/kirby/src/Http/Router.php", line: 154, details: [], route: null } app.js:1:23377

Do you have any idea? Thanks in advance! Andreas

RolandDreger commented 2 years ago

Hi Andreas,

I think it might be a problem with the authentication. If you try this (field endpoint) via e.g. Postman:

https://my-domain.local/api/pages/import/fields/import_data/get/files

you will probably get these errors

status  "error"
message "Unauthenticated"
code    403
exception   "Kirby\\Exception\\PermissionException"
key "error.permission"
file    "/Kirby/test/kirby/config/api/authentication.php"
line    11
details []
route   "(.*)/files"

Maybe this thread in Kirby Forum will help you?

Unfortunately, I don't have time to update the plugin at the moment. And with version 3.6 the plugin will definitely not work anymore.

Roland

andreasfehn commented 2 years ago

Hi Roland, thanks for your reply! you are right, I get this error too... I fear my javascript/ vue knowledge is unfortunately not good enough to help here. Therefore I buildt a solution outside of the panel to fulfill my own usecase without the need of js/ vue... Of course your approach is much more elegant! I would be really happy if you will find the time (or other help) in the future to make this plugin work in kirby 3.6 (which probably makes more sense then to put any work in 3.5 - although I am also still at 3.5 ;) Happy new year :) Andreas