# Klassen am HTML-Tag nach Update auf Shopware 5.7.16 nicht mehr korrekt

**URL:** <https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731>\
**Category:** Allgemein\
**Created:** [22. Dezember 2022 um 11:52 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731 "2022-12-22T11:52:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [22. Dezember 2022 um 11:52 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/1 "2022-12-22T11:52:40Z")

</div>

Hallo zusammen,

nach dem Update auf Shopware 5.7.16 haben die folgenden Klassen am HTML-Tag das „has–“ verloren: cssanimations localstorage sessionstorage

Vor dem Update:

```auto
<html class="no-js has--history has--localstorage has--sessionstorage has--cssanimations is--chrome is--webkit" lang="de" itemscope="itemscope" itemtype="http://schema.org/WebPage"></html>

```

Nach dem Update:

```auto
<html class="js history cssanimations localstorage sessionstorage is--chrome is--webkit" lang="de" itemscope="itemscope" itemtype="https://schema.org/WebPage">

```

Das Problem tritt mit einem Kauftheme und mit dem Responsive Theme auf.

Vielleicht hatte jemand schon dieses Problem?  
Ich finde leider nicht mal die Stelle, wo diese Klassen gesetzt werden, um nachzuschauen was da passiert.

Liebe Grüße

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [22. Dezember 2022 um 11:59 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/2 "2022-12-22T11:59:52Z")

</div>

Auch so:

```auto
<html class="js history cssanimations localstorage sessionstorage is--chrome is--webkit" lang="de" itemscope="itemscope" itemtype="https://schema.org/WebPage">

```

Keine Ahnung, was nun richtig wäre 😉

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [22. Dezember 2022 um 12:01 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/3 "2022-12-22T12:01:42Z")

</div>

Ich nehme an, so wie vor dem Update. Einige Stylings setzen .has–cssanimations voraus.  
Z.B der .form–ajax-loader - bei mir zumindest.

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [22. Dezember 2022 um 12:07 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/4 "2022-12-22T12:07:44Z")

</div>

Da [da](https://github.com/shopware/shopware/blob/5.7/themes/Frontend/Bare/frontend/index/index.tpl#L6-L8) kein Block ist, über den man da was einfügen kann, muss es von woanders herkommen.  
Guck mal hier:

> <https://github.com/shopware/shopware/commit/a8a01590f4417645cbba26c482c73fb2b060bdd1>

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [22. Dezember 2022 um 12:14 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/5 "2022-12-22T12:14:19Z")

</div>

Vielen Dank 🙂  
Wir haben also den Beweis, dass Pascal Thesing irgendwie da seine Finger im Spiel hatte 😉 😉  
Ich weiß nur leider nicht, inwieweit diese Änderung mit meinem Problem etwas zu tun hat und wie ich es beheben kann.

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [22. Dezember 2022 um 12:16 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/6 "2022-12-22T12:16:48Z")

</div>

Mal @P.Thesing rufen, und warten, ob er vorbeischauen mag 😉 Ggf. noch bei Slack anfragen.

Edit: Hab ihn auch auf Slack mal engesprochen und nach hier verlinkt.

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [22. Dezember 2022 um 15:00 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/7 "2022-12-22T15:00:32Z")

</div>

Herzlichen Dank! Hoffentlich gibt es dafür eine Lösung 🤞

---

<div class="post-metadata">

**Author:** ![P.Thesing](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@P.Thesing](https://forum.shopware.com/u/P.Thesing)\
**Post date:** [23. Dezember 2022 um 06:43 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/8 "2022-12-23T06:43:56Z")

</div>

@NextMike @sonic

Leider war ich das wirklich.

Um das has-- hinzuzufügen, kannst du in der themes/Frontend/Responsive/Gruntfile.js in der modernizr Config einen classPrefix setzen.

[https://modernizr.com/docs/](https://modernizr.com/docs/)

Ich habe dafür auch mal ein Ticket erstellt:  
[SW-26996](https://issues.shopware.com/issues/SW-26996)

Ich wünsche euch noch schöne Festtage aus Schöppingen.

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [23. Dezember 2022 um 08:09 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/9 "2022-12-23T08:09:00Z")

</div>

Internes Ticketsystem? 😉  
[https://issues.shopware.com/issues/SW-26996](https://issues.shopware.com/issues/SW-26996)

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [4. Januar 2023 um 11:35 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/10 "2023-01-04T11:35:54Z")

</div>

Hi Pascal,  
es müsste relativ wichtig sein, das mal zu fixen. Komme leider mit der Doku nicht klar, ich weiß nicht wo das mal hingehört:

```auto
{
  "classPrefix": "foo-",
  "feature-detects": ["dom/hidden"]
}

```

Gibt es seitens Shopware schon einen Anhaltspunkt, wann das gefixt werden würde?

Liebe Grüße

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [4. Januar 2023 um 11:37 UTC](https://forum.shopware.com/t/klassen-am-html-tag-nach-update-auf-shopware-5-7-16-nicht-mehr-korrekt/97731/11 "2023-01-04T11:37:20Z")

</div>

Recht frisch:

> <https://github.com/shopware/shopware/pull/2515>
>
> \### 1. Why is this change necessary?
> Commit \[SW-26390 - update modernizr\](https…://github.com/shopware/shopware/commit/a8a01590f4417645cbba26c482c73fb2b060bdd1) updated the version of modernizr in the Responsive Theme. This also removed the \`has--\` class prefix that is used in the styling (e.g. \[header.less\](https://github.com/shopware/shopware/blob/a9a4e2927d992c55748c9f3f0f1e3e3d1afacc5d/themes/Frontend/Responsive/frontend/\_public/src/less/\_modules/header.less#L370))
> 
> \### 2. What does this change do, exactly?
> Instead of changing the styling (and thus possibly breaking 3rd party themes), this change adds the class prefix \`--has\` when generating modernizr using gulp and also adds the generated \`modernizr-custom.js\`.
> 
> \### 3. Describe each step to reproduce the issue or behaviour.
> 
> \### 4. Please link to the relevant issues (if any).
> \[Ticket: SW-26973 | modernizr classes not updated in responsive theme\](https://issues.shopware.com/issues/SW-26973)
> 
> \### 5. Which documentation changes (if any) need to be made because of this PR?
> 
> 
> \### 6. Checklist
> 
> \- \[x\] I have written tests and verified that they fail without my change
> \- \[x\] I have squashed any insignificant commits
> \- \[x\] This change has comments for package types, values, functions, and non-obvious lines of code
> \- \[x\] I have read the contribution requirements and fulfil them.
