# .Page.Scratch.Set in shortcode; Get in template = Race condition?

**URL:** <https://discourse.gohugo.io/t/page-scratch-set-in-shortcode-get-in-template-race-condition/33125>\
**Category:** support\
**Created:** [May 28, 2021, 12:23pm UTC](https://discourse.gohugo.io/t/page-scratch-set-in-shortcode-get-in-template-race-condition/33125 "2021-05-28T12:23:53Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Scott\_Talsma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/scott_talsma/32/8708_2.png) [@Scott\_Talsma](https://discourse.gohugo.io/u/Scott_Talsma)\
**Post date:** [May 31, 2021, 3:21pm UTC](https://discourse.gohugo.io/t/page-scratch-set-in-shortcode-get-in-template-race-condition/33125/6 "2021-05-31T15:21:42Z")

</div>

Looks like a duplicate.

> [@Scratch variable set in Shortcode not available from the template of a Parent Page](https://discourse.gohugo.io/t/scratch-variable-set-in-shortcode-not-available-from-the-template-of-a-parent-page/31206/6):
>
> I have been doing some more checking for this behavior. The very interesting thing is that the Shortcode Scratch is rendered on the local server only in Fast Render mode. If --disableFastRenderMode is used then the Scratch is missing even on the first build. Also the Scratch is not outputted when the project is published with the command hugo. P.S. I deleted my previous answer as my assumption was incorrect. The rendering order does not seem to have to do much with it. Since Shortcodes are r…

The shortcode apparently doesn’t always render when using hugo in server mode. When I do a full build, it is fine.

But the suggested fix in the linked issue (use .Content before accessing the .Scratch created by running content) don’t apply, as I was doing so already.

Still stumped.

---

_[View the full topic](https://discourse.gohugo.io/t/page-scratch-set-in-shortcode-get-in-template-race-condition/33125)._
