# Upgrade naar discourse versie 2.8.0.beta7 & beta8 veroorzaakt gegevensverlies van scripts in de \</head\>-sectie die meestal niet in de browser zijn geladen

**URL:** https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871
**Category:** Support
**Created:** [2 december 2021 om 11:12 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871 "2021-12-02T11:12:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![narayanan](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@narayanan](https://meta.discourse.org/u/narayanan)
#### Post date: [2 december 2021 om 11:12 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871/1 "2021-12-02T11:12:57Z")

</div>

Hi,

After upgraded to discourse 2.8.0.beta7 & beta8 versions, below issue was occurred,

- I have written some javascript in theme component `</head>` (or) `Head` section which will work when discourse events getting triggered like OnAppEvent, DecorateWidget & OnPageChange. But the scripts written in `</head>` section wasn’t loaded in the browser sometimes. Header and After Header sections are loading well across the site. I found the `</head>` section script file was missing in browser source by seeing the below image,

 ![Javascript_NotLoadingIssue](https://global.discourse-cdn.com/meta/original/3X/a/b/aba90f78425b29c988b1cb08db61a957668a1fc5.png)

**Can someone confirm this issue occurred by upgrading the discourse version into 2.8.0.beta7 & beta8 or not ?**

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2 december 2021 om 12:59 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871/2 "2021-12-02T12:59:59Z")

</div>

Lots of things changed when switching to ember cli. [New installs will default to Ember CLI builds in Production](https://meta.discourse.org/t/new-installs-will-default-to-ember-cli-builds-in-production/208282)might provide some clues.

I think that even if you didn’t enable it explicitly, some of the changes made to prepare for it may be what is causing the problem.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2 december 2021 om 13:20 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871/3 "2021-12-02T13:20:03Z")

</div>

Are you seeing any errors in the browser console? I’m surprised that the issue only happens ‘sometimes’ - that makes me think it might be something specific to your site’s setup, rather than something that changed in Discourse 🤔

---

<div class="post-metadata">

### Author: ![narayanan](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@narayanan](https://meta.discourse.org/u/narayanan)
#### Post date: [2 december 2021 om 14:44 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871/4 "2021-12-02T14:44:40Z")

</div>

Yes, Please check the below browser console errors

 ![ScriptBlocking_ConsoleError - Copy](https://global.discourse-cdn.com/meta/original/3X/a/7/a7589633fb97f7b5c44e77a2329237f4b781922e.png)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2 december 2021 om 15:03 UTC](https://meta.discourse.org/t/upgraded-to-discourse-version-2-8-0-beta7-beta8-causing-data-loss-of-head-section-scripts-that-hasnt-been-loaded-most-times-in-browser/210871/5 "2021-12-02T15:03:23Z")

</div>

Do you have a proxy (e.g. cloudflare) in front of your site? If so, please try disabling it.
