Closed laryn closed 2 years ago
Looking at it very quickly....
That chunk of code is iterating through the hosting entity's field's delta to assign them a the paragraph entity, as in $node->field_name['en'][$delta]['entity'] = paragraph_entity
So I think the problem is with the host entity. It looks like the field in that host entity (the node) doesn't have a language code. Not sure why.
Thanks for checking, @argiepiano -- it does look like fields are not being saved with language codes (at least on a number of my sites, I haven't spun up a blank site to test yet). That does seem strange!
I linked a PR that solves it for now: https://github.com/backdrop-contrib/paragraphs/pull/130/files
Maybe it won't be needed if we track down why Backdrop fields seem to be always set to LANGUAGE_NONE.
Updating the top as it also seems to affect the modal sorting...
I added locale/translation on a site and when a page has a language set, the modal admin won't save new paragraphs from the front end. Log shows:
Modal sorting is also affecting when languages are involved: