# Recuperare post.raw funziona solo subito dopo la creazione del post

**URL:** <https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267>\
**Category:** Development\
**Created:** [16 Aprile 2019, 11:17pm UTC](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267 "2019-04-16T23:17:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Mathijs\_V](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mathijs_v/32/135133_2.png) [@Mathijs\_V](https://meta.discourse.org/u/Mathijs_V)\
**Post date:** [16 Aprile 2019, 11:17pm UTC](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267/1 "2019-04-16T23:17:27Z")

</div>

Hi there,

At the moment I am working on an extra PostMenuButton. Funny thing is that the **Cooked post** is always available but the **Raw post** is not!

Running discourse version [v2.3.0.beta8 +103]

```plaintext
<script type = "text/discourse-plugin" version = "0.1" >

  api.addPostMenuButton('trimetrack', attrs => {
    return {
      action: 'createTimeTracking',
      icon: 'calendar-alt',
      className: 'time-tracking',
      title: 'time_tracking',
      position: 'first'
    };
  }
                       );
  api.attachWidgetAction('post-menu', 'createTimeTracking', function() {
    const post = this.findAncestorModel();
    alert("Raw post: " + post.raw);
    alert("Cooked post: " + post.cooked);
  });
  
  </script>

```

Steps to reproduce:

1. Create theme component with code as shown above.

2. Create a new post, do not refresh, click the calendar icon.

3. See the alert pop-ups.  

4. Refresh the page. Click on the calendar button again for the same post.  

5. Now the post only has the cooked content available, raw content is not getting through.

I hope anyone can either spot my failure or confirm the bug 🙂

---

_[View the full topic](https://meta.discourse.org/t/retrieving-post-raw-only-works-right-after-creating-post/115267)._
