# Updating Discourse Plugins, taking the first step

**URL:** <https://meta.discourse.org/t/updating-discourse-plugins-taking-the-first-step/41241>\
**Category:** Development\
**Created:** [17. März 2016 um 23:23 UTC](https://meta.discourse.org/t/updating-discourse-plugins-taking-the-first-step/41241 "2016-03-17T23:23:47Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [17. März 2016 um 23:23 UTC](https://meta.discourse.org/t/updating-discourse-plugins-taking-the-first-step/41241/1 "2016-03-17T23:23:47Z")

</div>

I have to fully read the new plugin api format but my first problem actually has to do with this error:

`The discourse/components/post-menu object has been removed from Discourse and your plugin needs to be updated.`

PostMenu is a pretty important one and as far as I can tell does exist upon searching the Discourse repo on github. This is what is in the plugin:

```
import PostMenu from 'discourse/components/post-menu';
import StringBuffer from 'discourse/mixins/string-buffer';
import { iconHTML } from 'discourse/helpers/fa-icon';
import ComposerController from 'discourse/controllers/composer';

```

…some code inbetween…

```
  PostMenu.reopen({
    buttonForLike() {
      const likeAction = this.get('post.likeAction');
      if (!likeAction) { return; }
      var className = likeAction.get('acted') ? 'has-like fade-out' : 'like';
      var uId = Discourse.User.current().id;

      if (uId%2 == 0) className+= " custom-like"

      const opts = {className: className};

      if (likeAction.get('canToggle')) {
        const descKey = likeAction.get('acted') ? 'post.controls.undo_like' : 'post.controls.like';
        return new Button('like', descKey, 'heart', opts);
      } else if (likeAction.get('acted')) {
        opts.disabled = true;
        return new Button('like', 'post.controls.has_liked', 'heart', opts);
      }
    }
  });

```

Is there no more PostMenu component?

---

_[View the full topic](https://meta.discourse.org/t/updating-discourse-plugins-taking-the-first-step/41241)._
