Start a new topic

Property set failed: object in path "replyModel" could not be found or was destroyed.

I'm trying to set the CC of the editor in Freshdesk when the user clicks the reply button. I'm using with App Development Platform v2. It works the first time, but when I discard the draft, and click Reply again, the editor does not load, and the following error is displayed:

image


Here is a small repro:

function insertCC(client) {
	client.interface.trigger("setValue", {id: "cc", value: ["Test CC <testcc@mycompany.net>"]});
}

$(document).ready( function() {
	app.initialized()
		.then(function(_client) {
			console.log("appInit");
			var client = _client;
			client.events.on("ticket.replyClick", function() { insertCC(client) });
		});
});

Exact steps:

1. Load a ticket.

2. Click Reply. The CC field is populated with the value set in code.

3. Discard the draft with the trash can button next to the Send button.

4. Click Reply again. The editor is in half loaded state. Multiple "Property set failed: object in path "replyModel" could not be found or was destroyed." errors are visible in the developer toolbar.

This could possibly because of another plugin which might be disrupting it… because the code you shared seems to work perfectly fine for me.

Gif attached.




Yeah, now it works for me too. I suppose the original bug was fixed and the live site was updated since my original post.

Login or Signup to post a comment
JS Bin