However the link problem happens even if you use iframe. Try using this code extracted from your js see what happens, I still think it is a theme thing for the most part
@vrijvlinder said:
That is the weirdness I saw in your embed code.
However the link problem happens even if you use iframe. Try using this code extracted from your js see what happens, I still think it is a theme thing for the most part
ok I found which file is adding the target blank, line 147
embed_local.js
// hijack all anchors to see if they should go to "top" or be within the
// embed (ie. are they in Vanilla or not?)
$('a').live('click', function() {
var href = $(this).attr('href');
if (!href)
return;
var isHttp = href.substr(0, 7) == 'http://' || href.substr(0,8) == 'https://',
noTop = $(this).hasClass('SignOut') || $(this).hasClass('NoTop');
if (isHttp && href.substr(0, webroot.length) != webroot) {
$(this).attr('target', '_blank');
} else if (isEmbeddedComments) {
The problem may be several issues. Your forum is in www and the embed is in shoppingcart . something is forcing it to go to the webroot .
@vrijvlinder said:
ok I found which file is adding the target blank, line 147
I changed
$(this).attr('target', '_blank');
to
$(this).attr('target', '_self');
Now it works! thank you, thank you!
However, there is still this other weird problem. When I do I open the link it takes me there for a few seconds, but then flashes and brings me back to the main page. Any ideas what the problem is?
Yes I see, it used also happen in the blog about the target blank being added but that no longer happens after changing the embed local js ? right ?
And your blog is in www.django which may be why it is working there and not in
shoppingcart.django because that is a subdomain. My theory is that something needs to change in the htaccess to point to the embed in the new subdomain.
I had asked you before why not install the forum in the shoppingcart subdomain.
To see if the sam thing happens.
It should not happen in my opinion. I have embedded entire websites and they all open the links in the iframe. So it has to do with something like jquery
or a theme that is interfering.
I should be able to see the remote.js and the local.js on the list of files being called for the forum and they are not.All I see is the embed.js ...
Try to refresh the page on the discussion you click as soon as it loads. Before it goes back to the index. If you try to reach that url again it gives a 404 error.
the thing you want to do is find out the values. if you want to actually know what is going on.
what href.substr(0, webroot.length) is equal to
and what webroot is equal to
something like this...
if (isHttp && href.substr(0, webroot.length) != webroot) {
var subwebroot = href.substr(0, webroot.length)
console.log(subwebroot);
console.log(webroot);
or alert (subwebroot)
alert(webroot)
changing to self alters the behavior of everything i would think.
worst case I would just rem the line out.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes I agree, I think commenting the line out is the most neutral thing to do.
I wonder if something would need to change in the Vanilla htaccess as well.
All my doms are back up and running again . I wonder how I can find out exactly what happened. The techs at my host were not very clear or specific. Good to know they fixed it though....
It worked briefly but now is having the same problem, regardless of how the .htaccess file is configured. The forum embed works perfectly when viewed in Explorer. Firefox and Safari still open the discussion links into a new window.
Comments
That is the weirdness I saw in your embed code.
However the link problem happens even if you use iframe. Try using this code extracted from your js see what happens, I still think it is a theme thing for the most part
<iframe id="vanilla18803" name="vanilla18803" src="//www.djangobooks.com/forum/index.php?p=/&remote=http%3A%2F%2Fshoppingcart.djangobooks.com%2Fforum&locale=" scrolling="no" frameborder="0" width="100%" style="width: 100%; border: 0px; display: block; height: 2004px; " height="0"></iframe>
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I removed the :80 from the embed link and am still having the same problem with the links opening in another window. The embed link I'm using is:
The config file is set like this:
I have to go - but will check back later.
post the versions and names of plugins and links to where you got them to embed.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
OK, i added that. I'm still having the same problem so we'll have to try something else.
You want a list of every plugin I'm using right now?
ok I found which file is adding the target blank, line 147
embed_local.js
The problem may be several issues. Your forum is in www and the embed is in shoppingcart . something is forcing it to go to the webroot .
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I changed
to
Now it works! thank you, thank you!
However, there is still this other weird problem. When I do I open the link it takes me there for a few seconds, but then flashes and brings me back to the main page. Any ideas what the problem is?
yea that is weird, lol must be something else in there that needs to be looked at hmmm...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It doesn't happen on my blog, so it's specific to the store. See:
http://www.djangobooks.com/blog/discussions-2/
Perhaps it has something to do with the ajax used for the shopping cart? Or maybe something in the .htaccess of the store?
Yes I see, it used also happen in the blog about the target blank being added but that no longer happens after changing the embed local js ? right ?
And your blog is in www.django which may be why it is working there and not in
shoppingcart.django because that is a subdomain. My theory is that something needs to change in the htaccess to point to the embed in the new subdomain.
I had asked you before why not install the forum in the shoppingcart subdomain.
To see if the sam thing happens.
It should not happen in my opinion. I have embedded entire websites and they all open the links in the iframe. So it has to do with something like jquery
or a theme that is interfering.
I should be able to see the remote.js and the local.js on the list of files being called for the forum and they are not.All I see is the embed.js ...
Try to refresh the page on the discussion you click as soon as it loads. Before it goes back to the index. If you try to reach that url again it gives a 404 error.
This pretty much confirms the htaccess problem.
http://shoppingcart.djangobooks.com/discussion/12546/bridge-weight-and-dimensions
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Definitely something in the htacces. I removed everything except:
Problem gone!
So to summarize, you changed the js to target self and the htaccess file ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
That is correct. Now everything seems to work but still testing. Thanks for your help!
you are very Welcome ! hope it stays working
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
the thing you want to do is find out the values. if you want to actually know what is going on.
something like this...
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes I agree, I think commenting the line out is the most neutral thing to do.
I wonder if something would need to change in the Vanilla htaccess as well.
All my doms are back up and running again . I wonder how I can find out exactly what happened. The techs at my host were not very clear or specific. Good to know they fixed it though....
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It worked briefly but now is having the same problem, regardless of how the .htaccess file is configured. The forum embed works perfectly when viewed in Explorer. Firefox and Safari still open the discussion links into a new window.
Do you have any other ideas?
If you have force remote url TRUE , try FALSE or vice versa
Do not force embed the dashboard. Try peregrine's suggestions about getting to the root of the problem.
Try the other theme again.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌