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

Console import of Neo fields results in unknown method getBodyParam() #64

Open
paulnzime opened this issue Jun 9, 2023 · 2 comments
Open

Comments

@paulnzime
Copy link

Running the attached JSON via the Architect import area of the CMS works fine but attempting to import this via the CLI command results in the following error:

Calling unknown method: craft\console\Request::getBodyParam()

Digging deeper into this, I can see that this occurs because of line 351 in /vendor/spicyweb/craft-neo/src/Field.php that does this:
} elseif ($request->getBodyParam('neoBlockType' . (string)$blockTypeId) !== null) {

And I've confirmed adding !$request->getIsConsoleRequest() resolves the issue.

Is this an Architect issue or should I raise with the developers of Neo instead?

To Reproduce
Use the following JSON file:
neo-import.json.zip

Environment:

  • CraftCMS Version: 4.4.13
  • Architect Version: 4.0.0
  • Neo Version: 3.7.9
@spAnser
Copy link
Contributor

spAnser commented Aug 1, 2023

Hmm. I'm unsure. Does it import properly with that added?

@spAnser
Copy link
Contributor

spAnser commented Aug 1, 2023

It may be something I can fix. I'll have to do some testing. I may be able to re-create the bodyParam if run from cli but it could also just be that neo is complicated and maybe cli support isn't worth it for plugins that could change at any time and need constant maintenance.

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

2 participants