spicywebau/craft-neo

500 server error while trying to add blocks on multisite, when editing an entry in the embedded sidepanel editor.

Closed this issue · 1 comments

Bug Description

I have a multisite set up. When I edit an entry, and open the side panel editor, to allow me to edit the content of other pages, it creates a 500 error when I try and add a new Neo block. This only happens on the secondary site, not the primary site.

I get the following error in my craft logs and a Request failed with status code 500 in craft:

2024-09-10 10:34:05 [web.ERROR] [TypeError] craft\services\Elements::canCreateDrafts(): Argument #1 ($element) must be of type craft\base\ElementInterface, null given, called in /public_html/vendor/spicyweb/craft-neo/src/controllers/Input.php on line 130

Steps to reproduce

Create a multisite, with Site A as your primary site.
Go to Site B entries.
Add a new entry in site B.
Add a link to another entry in site B.
Double click that entry to open the side panel editor overlay.
Try and add a Neo block to this new page in the side panel editor.

Expected behaviour

No response

Neo version

4.2.12

Craft CMS version

PRO 4.12.1

What is the affected Neo field's propagation method?

Save blocks to all sites the owner element is saved in

Does this issue involve templating, and if so, is eager-loading used?

This is not a templating issue

Thanks for reporting that - fixed now in 4.2.13 and 5.2.6.