Support » Plugin: Steemit Feed » Needs an update for Steem.js API changes

  • ResolvedModerator Sergey Biryukov

    (@sergeybiryukov)


    WordPress Dev

    Hi @minitekgr, thank you for the plugin!

    I’ve just tested it on a local install, and it looks great, but apparently some changes are needed to make it work after the recent Steem.js API changes.

    Currently the plugin just shows a loading icon that keeps spinning, and browser console displays an error:

    
    steem.min.js:1 WebSocket connection to 'wss://node.steem.ws/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
    

    To fix this, I’ve made a couple of edits:

    1. In mn_steemit_scripts_enqueue(), load the CDN version of the script instead of the one bundled with the plugin:
      
      wp_register_script( 'mn_steemit_scripts', 'https://cdn.steemjs.com/lib/latest/steem.min.js', array('jquery'), MNSFVER, true );
      
    2. In mn_render_steem_feed(), replace steem.getDiscussionsByAuthorBeforeDate
      with steem.api.getDiscussionsByAuthorBeforeDate.

    With these changes the plugin works as expected. Could you include them in the next release?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Needs an update for Steem.js API changes’ is closed to new replies.