Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import - Failed: Method Not Allowed #17

Open
roma-sem opened this issue Nov 11, 2020 · 7 comments
Open

Import - Failed: Method Not Allowed #17

roma-sem opened this issue Nov 11, 2020 · 7 comments

Comments

@roma-sem
Copy link

roma-sem commented Nov 11, 2020

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?

@lazurey
Copy link
Owner

lazurey commented Nov 12, 2020

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.

@roma-sem
Copy link
Author

roma-sem commented Nov 12, 2020

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
Copy link
Author

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.

@pedrolaxe
Copy link

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!

@sven09
Copy link

sven09 commented Dec 2, 2020

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.

@lazurey
Copy link
Owner

lazurey commented Dec 3, 2020

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

@hotelroyal
Copy link

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

Marc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants