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

Same image added to multiple Matrix blocks when using 'Use this filename for assets created from URL' #1471

Closed
tommysvr opened this issue Jun 28, 2024 · 2 comments
Assignees
Labels

Comments

@tommysvr
Copy link
Contributor

Description

When opting to rename files during the import, only the first image in each array is imported, and that is duplicated across multiple Matrix Blocks.

Steps to reproduce

  1. Create a Matrix field/block type with an image field
  2. Using the example feed below, set up Feed Me to import into the image field inside Matrix
  3. Ensure 'Use this filename for assets created from URL' is using the filename
  4. Imported entry will show the same image twice:
    screenshot_2024_06_28 _10 25

This feature was added here: #1336

Additional info

  • Craft version: 4.10.2
  • PHP version: 8.2
  • Database driver & version: MySQL 8.0
  • Plugins & versions: Feed Me 5.5.0

Example Feed:

{
  "items": [
    {
      "title": "Entry 1",
      "images": [
        {
          "url": "https://via.placeholder.com/150",
          "filename": "image1"
        },
        {
          "url": "https://via.placeholder.com/200",
          "filename": "image2"
        }
      ]
    },
    {
      "title": "Entry 2",
      "images": [
        {
          "url": "https://via.placeholder.com/250",
          "filename": "image3"
        },
        {
          "url": "https://via.placeholder.com/300",
          "filename": "image4"
        }
      ]
    }
  ]
}
@i-just
Copy link
Contributor

i-just commented Jun 28, 2024

Thanks for a clear description, Tommy! PR raised.

@i-just i-just self-assigned this Jun 28, 2024
@angrybrad
Copy link
Member

Resolved in #1472 and will be included in the next 5 and 6 releases.

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

3 participants