Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I set in a field a taxonomy (with his bundle) and a content (with his bundle) only nodes are returning in the search result.
Actually it does work normally as a normal field but as a paragraph.
When is using this field as a paragraph the AJAX that changes the queries get missing and just get selected Content and change it to Taxonomy Term don't work. My thought could be the AJAX miss the ID when the Paragraph inject / include this field.
Comment | File | Size | Author |
---|---|---|---|
#7 | taxonomies_and_nodes-2698065-7.patch | 7.41 KB | jibran |
Comments
Comment #2
killua99 CreditAttribution: killua99 commentedActually I found the issue.
Was all in the javascript on change attribute. The logic works well but the naming confection isn't modular or that dynamic tho
This is my first approach on how to solve this issue.
The selector is looking for a select name=something but it doesn't work with inline form like paragraphs where the field name will be paragraph[paragraph_entity][field_name] so from there it start failing.
I did a first thought on how to solve via class and not naming fields. Will be hard to know if any other module on the whild have differents names but class.
The module could build the class and made them more reliable than a field name.
Comment #3
jibranHave you tried this JS with mutli value field?
Comment #4
killua99 CreditAttribution: killua99 commentedYes and it fails.
It was my first thoughts on how to solve the issue adding a class selector. Still it need to figure out the form_state and add the delta from somewhere.
Comment #5
jibranHow about this? Let me add some tests for this as well.
Comment #6
jibranNow with JS tests <3
Comment #7
jibranExpanded test coverage a little and added some docs.
Comment #8
larowlannice
Comment #11
jibranThanks @larowlan for the review.