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

Merged

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
@angrybrad angrybrad merged commit 4f28003 into 6.x Sep 26, 2024
5 checks passed
@angrybrad angrybrad deleted the bugfix/1477-matrix-field-with-assets-with-dynamic-subpath branch September 26, 2024 00:07
angrybrad added a commit that referenced this pull request Sep 26, 2024
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.

2 participants