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

Importing a tree structure incorrectly thinks that the parent changed every time #1372

Open
boudewijn-zicht opened this issue Oct 25, 2023 · 0 comments
Labels

Comments

@boudewijn-zicht
Copy link
Contributor

Description

When you configure an import with a parent (i.e. importing a tree structure) the import uses the parent attribute where the id of the parent element is stored. However, in Craft this attribute is called parentId. This results in a bug where every child element will incorrectly determine that its parent has changed.

This in turn results in an additional element save and its associated overhead in DB calls and element revisions.

Steps to reproduce

  1. Configure an import with a nested structure
  2. Run the feed in debug and see that none of the child elements will say that the element was skipped, see image below
    image

A fix is available here: #1313. With the changes in this PR every child element will correctly determine that it has not changed and can be skipped, see image below
image

Additional info

  • Craft version: Craft Pro 4.4.16.1
  • PHP version: 8.1.24
  • Database driver & version: MySQL 8.0.25
  • Plugins & versions: Feed Me 5.2.0
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

1 participant