# Aufgabe - Scheduled Tasks - product\_download.media.cleanup failed

**URL:** <https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833>\
**Category:** Administration\
**Created:** [7. März 2023 um 11:07 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833 "2023-03-07T11:07:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![screol](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@screol](https://forum.shopware.com/u/screol)\
**Post date:** [7. März 2023 um 11:07 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833/1 "2023-03-07T11:07:03Z")

</div>

Hat jemand eine Idee, warum dieser Fehler auftritt?  
Shopware 6.4.20.0 \> Administration \> Tools \> „Geplante Aufgaben“  
Danke für einen Hinweis!

---

<div class="post-metadata">

**Author:** ![Thorsten-A](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@Thorsten-A](https://forum.shopware.com/u/Thorsten-A)\
**Post date:** [13. März 2023 um 11:38 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833/2 "2023-03-13T11:38:11Z")

</div>

Das genaue WARUM und wie es zu reparieren wäre, weis ich auch noch nicht.

Ab 6.4.19.0 gab es ein neues Feature „digital products“

- Tabelle „product\_download“
- unsichtbarer Ordner „Product downloads“ (siehe Tabellen „media\_folder“, „media\_default\_folder“)

> **[Shopware 6 Release News – the new features in February 2023](https://www.shopware.com/en/news/shopware-6-release-news-february-2023/)**
>
> Shopware 6.4.19.0 has arrived! Get ready for some must-have features to help you sell digital products and customize your content based on the device.

Hier wurde ein damit ungefähr verwandtes Problem gemeldet:

> **[Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-25579)**
>
> Shopware Issuetracker

Der product\_download.media.cleanup versucht den ProductDownload-Ordner aufzuräumen, also z.B. unused-media-files zu finden und zu entfernen.  
Dies scheitert scheinbar am field-mapping und es wird abgebrochen.

```auto
Uncaught PHP Exception Shopware\Core\Framework\DataAbstractionLayer\Dbal\Exception\UnmappedFieldException: "Field "id" in entity "media" was not found." at /home/.../vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityDefinitionQueryHelper.php line 220 {"exception":"[object] (Shopware\\Core\\Framework\\DataAbstractionLayer\\Dbal\\Exception\\UnmappedFieldException(code: 0): Field \"id\" in entity \"media\" was not found. at /home/.../vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityDefinitionQueryHelper.php:220)"} []

```

EntityDefinitionQueryHelper.php:220

```auto
if (!\is_string($associationKey) || !$fields->has($associationKey)) {
  throw new UnmappedFieldException($original, $definition);
}

```

Auch ich hoffe ebenso auf Klärung und nähere Hinweise, Danke.

---

<div class="post-metadata">

**Author:** ![marove](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@marove](https://forum.shopware.com/u/marove)\
**Post date:** [20. Februar 2024 um 12:18 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833/3 "2024-02-20T12:18:26Z")

</div>

Hallo Zusammen,

gleiches Problem auch bei mir. Problem tritt seit etwa 1-2 Wochen auf.

Version: 6.4.20.2

---

<div class="post-metadata">

**Author:** ![PromoID](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/promoid/32/14015_2.png) [@PromoID](https://forum.shopware.com/u/PromoID)\
**Post date:** [20. Februar 2024 um 13:50 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833/4 "2024-02-20T13:50:00Z")

</div>

Gib mal bei Tools \> Log viewer \> prod-2024-02-20 ein und schau dir die Fehler mal an.

---

<div class="post-metadata">

**Author:** ![marove](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@marove](https://forum.shopware.com/u/marove)\
**Post date:** [20. Februar 2024 um 17:57 UTC](https://forum.shopware.com/t/aufgabe-scheduled-tasks-product-download-media-cleanup-failed/98833/5 "2024-02-20T17:57:26Z")

</div>

Hallo PromoID,

tatsächlich erhalte ich exakt die gleiche Fehlermeldung wie auch bei Thorsten-A:

```auto
Uncaught PHP Exception Shopware\Core\Framework\DataAbstractionLayer\Dbal\Exception\UnmappedFieldException: "Field "id" in entity "media" was not found." at /home/.../vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityDefinitionQueryHelper.php line 220 {"exception":"[object] (Shopware\\Core\\Framework\\DataAbstractionLayer\\Dbal\\Exception\\UnmappedFieldException(code: 0): Field \"id\" in entity \"media\" was not found. at /home/.../vendor/shopware/core/Framework/DataAbstractionLayer/Dbal/EntityDefinitionQueryHelper.php:220)"} []

```
