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

fix parsing dynamic path for assets field in a matrix field #1501

Open
wants to merge 1 commit into
base: 6.x
Choose a base branch
from

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Aug 30, 2024

Description

When parsing an assets field that’s inside of a matrix field, we can no longer pass the root element to the craft\feedme\fields\Assets.

Importing into an assets field inside of a matrix field, where the assets field had a dynamic subpath set, worked in v4 because getting an owner of a root entry (even via {{ dump(entry.owner) }}) returned that entry.

In v5, it’ll return null, causing the dynamic path to fail. If the owner is null, then {{ owner.slug }} will be null, causing this check to get triggered.

With this PR, the dynamic path will resolve as expected.

Related issues

#1477

@i-just i-just requested a review from angrybrad as a code owner August 30, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant