Support creating entities

Created on 19 October 2023, about 1 year ago
Updated 22 November 2023, 12 months ago

Is there a way to support the core option of "Create referenced entities if they don't already exist"?

It does not seem to work. The add field seems to only support existing entities. Am I missing something?

Thanks.

πŸ› Bug report
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States duckydan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @duckydan
  • πŸ‡ΊπŸ‡ΈUnited States duckydan

    I have been messing with this for a while.

    From what I can see, you cannot create new entities, even if the reference field is set to do that.

    The form is there to add a new entity. But it throws an ajax error in the js console.

    [Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (edit, line 0)
    [Error] AjaxError: 
    An AJAX HTTP error occurred.
    HTTP Result Code: 500
    Debugging information follows.
    Path: /node/2/edit?ajax_form=1
    StatusText: Internal Server Error
    ResponseText: The website encountered an unexpected error. Please try again later.
    	(anonymous function) (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:264:13136)
    	complete (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:264:5845)
    	(anonymous function) (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:309:3569)
    	c (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:3:25272)
    	fireWith (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:3:26017)
    	l (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:3:77858)
    	(anonymous function) (js_E-PluqRkPYBpQNMkwlIH8AvocHf0XJoRhj1lJ40izzM.js:3:80206)

    I assumed it was a conflict with another module, so I installed a plain 10.1.6 with zero contrib modules other than this one. I created an entity reference field and could create and reference both existing, and new nodes. So it works fine using the default Drupal widget.

    I added the dev version of entityqueue and set the form to use it on that field.

    It fails every time.

    Here is some more info:

    PHP 8.1.12
    Apache 2.4.55
    db is 10.11.2-MariaDB
    Memory is set to 256MB

    I would REALLY like to get this module working. It is an ideal solution for my site.

    Any input is welcome. Am I really the only one running into this?

  • πŸ‡ΊπŸ‡ΈUnited States duckydan
  • πŸ‡ΊπŸ‡ΈUnited States duckydan

    I just installed a plain vanilla Drupal via composer on a site with no CDN or Varnish or anything. I created two articles. I have added a reference field to the basic page content type to allow selecting articles, with the option to create new ones.

    It totally failed with the exact same error.

    So, for Drupal 10.1.6, the ability for Entityqueue to allow adding nodes is totally broken.

    I am not great at troubleshooting ajax stuff like this, so I don't know how to fix this.

    I will set this to a high priority because an essential functionality in core breaks when using this as a widget.

  • πŸ‡ΊπŸ‡ΈUnited States duckydan

    I will leave the site I made to test this up. If anyone wants to log in and mess around, I would happily provide the needed info.

  • πŸ‡ΊπŸ‡ΈUnited States duckydan

    I was able to get exactly what I needed from IEF (better, actually), but I would be willing to test any fixes for this.

Production build 0.71.5 2024