feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Super Table within Matrix nukes content

Open maxpdesign opened this issue 2 years ago • 3 comments

Description

For a client site I created a content builder with a Matrix field that uses a Super Table field to provide nesting for an additional Matrix field. I use the Matrix nesting so they can build FAQ block between other blocks.

This Content Builder is also being used on a section where a daily import is done using Feed Me. For the import I mapped the appropriate fields but the Content Builder is not mapped because this content should not be overwritten during this import. But each time this import runs, it gets overwritten by an empty array. The result is that all the content in this field gets nuked.

I tracked down the issue to the use of a Super Table within the Matrix field. Once I remove this Super Table, the content within the field doesn't get overwritten. Somehow Feed Me marks the matrix field for import when the Super Table field is used within.

Steps to reproduce

  1. Create a matrix field with a super table field as a block (will not be mapped for import)
  2. Create a text field (will be mapped for import and used as unique identifier to match against)
  3. Add the fields to the section where content will be imported
  4. Create an entry and fill out the unique identifier + add some content to the matrix field
  5. Create a feed me import
  6. Map the text field for import and mark it as unique identifier
  7. DON'T map the matrix field
  8. Run import
  9. Matrix field's content is gone

Additional info

  • Craft version: 3.7.62
  • PHP version: 8.1.11
  • Database driver & version: MySQL 5.7.34
  • Plugins & versions: "ext-json": "*", "born05/craft-assetusage": "^2.3.1", "bymayo/delete-account": "^1.0.2", "clarknelson/craft-recaptcha-3": "^1.2", "craftcms/cms": "^3.7.59", "craftcms/commerce": "^3.4.18", "craftcms/commerce-mollie": "^3.0.1", "craftcms/element-api": "^2.8.5", "craftcms/feed-me": "^4.4.3", "craftcms/postmark": "^2.1.0", "craftcms/redactor": "^2.10.6", "doublesecretagency/craft-googlemaps": "^4.1.8", "guzzlehttp/guzzle": "^7.4", "http-interop/http-factory-guzzle": "^1.0", "masugadesign/labreports": "^1.0.0", "meilisearch/meilisearch-php": "^0.24.0", "nystudio107/craft-eagerbeaver": "^1.0.4", "nystudio107/craft-minify": "^1.2.11", "nystudio107/craft-retour": "^3.2.2", "nystudio107/craft-seomatic": "^3.4.41", "presseddigital/linkit": "^3.0.4.1", "putyourlightson/craft-elements-panel": "^1.1.1", "putyourlightson/craft-sprig": "^1.12.2", "solspace/craft-freeform": "^3.13.21", "studioespresso/craft-dumper": "^2.0.0", "vaersaagod/dospaces": "^1.1.3", "verbb/navigation": "^1.4.30", "verbb/super-table": "^2.7.2", "vlucas/phpdotenv": "^3.4.0", "wrav/oembed": "^1.13.19", "yiisoft/yii2-redis": "^2.0"

maxpdesign avatar Jan 19 '23 11:01 maxpdesign

Hi, thanks for getting in touch. Could you please clarify which version of Craft CMS this is occurring on? You’ve listed 3.7.62 but then have 3.7.28 under Plugins & versions. Also, which version of Feed me is this happening on?

i-just avatar Jan 23 '23 11:01 i-just

@i-just Hi, I edited my previous comment so the correct info about the plugins é versions are included. I was working on multiple projects at once and pasted the wrong info.

The version of Craft CMS is 3.7.62 and the Feed Me version is 4.5.3

maxpdesign avatar Jan 25 '23 10:01 maxpdesign

Thanks! I’m still unable to reproduce this error. Would you please be able to send your database export, composer.lock and composer.json, to [email protected] so that we can dig deeper?

i-just avatar Jan 25 '23 14:01 i-just