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

Entries field with missing reference throws error inside Matrix #1069

Closed
floatingbits opened this issue Dec 7, 2021 · 4 comments
Closed
Labels

Comments

@floatingbits
Copy link

Description

In a (entry-) feed containing a Matrix field with a nested Entries field, I get an error under some circumstances:
Error:

Sammlungen: array_merge_recursive(): Argument #2 must be of type array, null given - Matrix.php: 106

Circumstances must be as follows:
In the list of entry IDs, at least one entry must be found and a following one must not be found. This one will throw the error.

Steps to reproduce

  1. Set up a feed for an entry type containing an entries field inside a Matrix block.
  2. Feed data for the entries field has got the following pattern:
    {entriesField: "idThatCanBeFoundInTheSystem", "idThatCanNOTBeFoundInTheSystem", //Will throw the error on feed run }

Additional info

  • Craft CMS version: 3.7.24
  • Feed Me version: 4.4.1

I will provide a pull request for this. Seems to be fixed easily.

@ieuan
Copy link

ieuan commented Feb 18, 2023

This issue affects 5.0.5 as well, and the same code change seems to resolve the problem, does a new bug report need to be created?

Additional info

  • Craft version: 4.3.7.1
  • PHP version: 8.0
  • Database driver & version: postgres:15
  • Plugins & versions: craftcms/feed-me:5.0.5

angrybrad added a commit that referenced this issue Mar 10, 2023
@angrybrad
Copy link
Member

Resolved in bc14d19

angrybrad added a commit that referenced this issue Mar 10, 2023
@brandonkelly
Copy link
Member

Feed Me 4.6.0 (Craft 3) and 5.1.0 (Craft 4) have been released with the fix for this.

@Humbi1992
Copy link

Installed craftcms/cms 4.5.10 and craftcms/feed-me 5.2, this error is still happening to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants