• Hi! This plugin is somewhat of a cornerstone of a large portion of our site, so this is pressing.

    It seems drawit.io has moved everything over to diagrams.net, including the URIs of the embedding API. As of the past few days, opening the editor now gives me an endless spinner and tells med that the app.diagrams.net URI will stop working, and to use embed.diagrams.net instead.

    I tried altering the iframe src in drawit.php:456 to:
    https://embed.diagrams.net/?embed=1&analytics=0&gapi=0&db=0&od=0&proto=json&spin=1

    and iframe contentWindow.postMessage target in drawit.js:10 to:
    https://embed.diagrams.net/

    The message telling me I’m at the wrong address is gone now, but the spinner still won’t stop. It seems the data isn’t getting through one way or the other. I’m not a dev, so I wouldn’t know.

    Any chance this can be fixed?

    • This topic was modified 4 years, 4 months ago by skandahle.
    • This topic was modified 4 years, 4 months ago by skandahle.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author assortedchips

    (@assortedchips)

    The draw.io announcement about this domain name change (https://www.diagrams.net/blog/move-diagrams-net) indicates that the old draw.io name should still work for everything. If it is not working for this, please file an issue at their github repo (https://github.com/jgraph/drawio/issues).

    Hi, did you find a solution to this? I am having the same problem, we use this extensively as well.
    Hope you did, would appreciate any pointers. Cheers

    HI, the oid work is not to edit. when I click to edit,it will show me the alert.
    Is there an estimated time for the completion of the change?

    For anybody else who is having a problem with the recent changes to drawio here is what I did that worked for me.

    BTW This involves changing the various php files and a javascript files

    First the php part
    ==========================
    1. open “drawit.php” in an editor

    2. replace wherever you find "https://www.draw.io" replace with "https://embed.diagrams.net"

    2. Add a time stamp to the “drawit.js” enqueued script to make sure your javascript is not cached so find the function media_menu_handler()

    See the “?v=’.time()” below. This is what I have added to ensure your javascript gets updated, without this you will probably find you are dealing with an old cached js file

    public function media_menu_handler() {
            $errors = '';
            wp_enqueue_script($this->plugin_slug . '-js', plugins_url('js/' . $this->plugin_slug . '.js?v='.time(), __FILE__));
            if(current_user_can('manage_options')) {
                wp_enqueue_style($this->plugin_slug . '-css', plugins_url('css/' . $this->plugin_slug . '.css', __FILE__), array(), $this->plugin_version);
            } else {
                wp_enqueue_style($this->plugin_slug . '-css', plugins_url('css/' . $this->plugin_slug . '.min.css', __FILE__), array(), $this->plugin_version);
     return wp_iframe(array($this, 'iframe'), $errors);
        }
            }

    3. Then save that file

    4. Then Open “drawit.js”
    wherever you find "https://www.draw.io" replace with "https://embed.diagrams.net"

    5. Save

    6. Refresh page

    You should now see it working, at least that is my experience

    Cheers

    • This reply was modified 4 years, 2 months ago by patsam.
    • This reply was modified 4 years, 2 months ago by patsam.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Breaking change: new embed URI’ is closed to new replies.