strapi-plugin-content-export-import icon indicating copy to clipboard operation
strapi-plugin-content-export-import copied to clipboard

Import - Failed: Method Not Allowed

Open roma-sem opened this issue 5 years ago • 7 comments
trafficstars

Hi I have an error "Method Not Allowed", when trying to import valid JSON file. All export/import permissions were allowed for both Authenticated and Public user.

Any ideas how to fix it?

roma-sem avatar Nov 11 '20 20:11 roma-sem

I tried a clean install on Strapi v3.3.2 and I can do a simple export and import.

Could you provide more information? e.g. Strapi version, is it a collection type or a single type, etc.

lazurey avatar Nov 12 '20 07:11 lazurey

It's a Collection type.

NPM v. 6.14.8, Node v. 14.15.0 Strapi v. 3.3.2 Windows 10

I also ran "npm audit fix" for plugin and Strapi. Shows no errors and didn't help.

POST method works (creates new empty single Work post): POST http://localhost:1337/works

roma-sem avatar Nov 12 '20 14:11 roma-sem

OK. So after trying lots of options. I accidentally made it to work (probably same as the 1st time but I couldn't recall the chain of events).

All works now only if I do manual setup and then, on top of that I run command "npm i strapi-plugin-content-export-import". After npm command no need in running "npm run build".

I checked on another brand new setup if all will work with these:

  1. Just npm command itself - NEGATIVE. You can see plugin in GENERAL -> Plugins but not in PLUGINS section
  2. Manual setup - Almost Positive. I can export but no import.
  3. Manual setup + npm setup => POSITIVE

I don't know the reason but hope you can figure out for future.

P.S. I also tried manual setup on a different Mac machine and import was giving the same error.

P.P.S. Anyway, thank you guys for a great job as I need to migrate from WordPress to Strapi. Looks like it's only your import tool is accessible at the moment.

roma-sem avatar Nov 13 '20 05:11 roma-sem

I had the same problem but I ran the command "npm i strapi-plugin-content-export-import" and then "yarn develop" and it worked correctly! Thanks!

pedrolaxe avatar Nov 18 '20 18:11 pedrolaxe

I had the same problem. The solution (after some hours of research ;-D ) is to clone the plugin into the correct folder:

correct : ...plugins/content-export-import not correct : ...plugins/strapi-plugin-content-export-import

This happens if you just use git clone without any target folder.

Maybe you can give a hint in the readme.

Cool plugin. Thanks for this.

sven09 avatar Dec 02 '20 21:12 sven09

Hi @sven09 thanks for pointing it out, I didn't know that the wrong folder name will cause this issue. Hopefully this can help others solve this problem.

Actually it's already in the README, just not obvious enough.

# clone the plugin code into a folder and skip the prefix
git clone [email protected]:lazurey/strapi-plugin-content-export-import.git content-export-import

lazurey avatar Dec 03 '20 01:12 lazurey

Thanks so much for your plugin, works fin on the fist run! - I took time to read the issues beforehand just in case...

Marc

hotelroyal avatar Dec 10 '20 10:12 hotelroyal