mikedoubintchik/wordpress-post-modal

Latest Host url not working

Closed this issue · 2 comments

In the recent Feb 21, 2017 commit, this is not working for me:

var host = window.location.host;
var link = $('<a>', {
href: this.attr('href')
 })[0].hostname;
return (link !== host);

I had to revert back to its previous declaration for it to work:

var host = new RegExp('/' + window.location.host + '/');
var link = 'http://' + window.location.host + this.attr('href');
return !host.test(link);

The JS error:

http://mysite.com/artwork/originals/undefined/wp-post-modal/proxy.php?url=http://mysite.com/artwork/originals/waiting-for/
Failed to load resource: the server responded with a status of 404 (Not Found)

It's adding undefined to the url path. Also, the path seems incorrect for the loading.gif as well.

It looks like the undefined is not coming from that function but from $pluginUrl

Can I see your implementation?

Most likely it's my fault. I screwed something up in the js file.