Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Emebed issue with Version 2.1b2

12467

Comments

  • peregrineperegrine MVP
    edited December 2013

    what is the Webroot in your config.php?

    also look at your settings in wordpress with regards to vanilla. You could try removing the 80 there.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    what is the Webroot in your config.php?

    I don't see a setting specifically for the webroot in the config file. Do I need to add that?

    also look at your settings in wordpress with regards to vanilla. You could try removing the 80 there.

    I'm not really concerned with the wordpress embed. That was just an experiment...I'd like the forum to embed in my store only.

  • meshugymeshugy Musician/Hacker ✭✭
    edited December 2013

    although, I don't have the problem of the links bouncing back to the main page in the wrodpress install. So it's something specific about how the store is setup.

  • hgtonighthgtonight ∞ · New Moderator

    I just want to thank @peregrine and @vrijvlinder for their marathon help sessions!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • meshugymeshugy Musician/Hacker ✭✭

    @hgtonight said:
    I just want to thank peregrine and vrijvlinder for their marathon help sessions!

    No doubt! Best open source support I've ever seen, you guys are great!

  • @hgtonight thats worth clicking awesome for you. :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I'd like the forum to embed in my store only.

    so what is your universal script you are using?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited December 2013

    although, I don't have the problem of the links bouncing back to the main page in the wrodpress install. So it's something specific about how the store is setup.

    I think the wordpress problem was due to the :80 in your script in wordpress

    this deals with webroot - don't know if it is really an issue. usually you can search if someone posts something you don't follow.

    I just saw the the js reads webroot from the config and that was where you had problems with the length and webroot.

    this is what I found in search in webroot.

    http://vanillaforums.org/discussion/comment/184041#Comment_184041

    http://vanillaforums.org/discussion/comment/197352#Comment_197352

    I think you need to focus on one thing (since wordpress wasn't a real interest, probably shouldn't pursued it).

    I think it all goes back to you htaccess if you are being redirected away.

    maybe x00 or someone who has embedded in another app can shed some light.

    I've gotten lost... maybe you need to summarize what is wrong now and where you want to go. and give links examples and screenshots.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @hgtonight

    I think now would be a good time to nominate peregrine for the marathon comment badge !!

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I don't see a setting specifically for the webroot in the config file. Do I need to add that?

    It might help

    $Configuration['Garden']['WebRoot']  = FALSE; // You can set this value if you are using htaccess to direct into the application, but the correct webroot isn't being recognized.
    $Configuration['Garden']['StripWebRoot'] = FALSE;
    

    I'm not really concerned with the wordpress embed. That was just an experiment...I'd like the forum to embed in my store only.

    then why not simply install the forum in that subdomain instead of the domain?

  • meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder said:
    If you have force remote url TRUE , try FALSE or vice versa

    Tried that, it didn't fix the problem of links bouncing back to the main page.

    Do not force embed the dashboard. Try peregrine's suggestions about getting to the root of the problem.

    I don't totally understand his suggestion but will try to implement it.

    Try the other theme again.

    Will do....

  • meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder said:

    then why not simply install the forum in that subdomain instead of the domain?

    The store will be moved to www.djangobooks.com in a week or so. I'm just testing now. The final configuration will have the store at djangobooks.com and the forum at djangobooks.com/forum

  • meshugymeshugy Musician/Hacker ✭✭

    Tried this but it didn't make any difference:

    $Configuration['Garden']['WebRoot'] = FALSE; // You can set this value if you are using htaccess to direct into the application, but the correct webroot isn't being recognized.
    $Configuration['Garden']['StripWebRoot'] = FALSE;
    
  • you want to put your name of your webroot in. FALSE is the same as not even putting it in the config.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    I've gotten lost... maybe you need to summarize what is wrong now and where you want to go. and give links examples and screenshots.

    The problem I'm trying to solve now is occurring while embedding the forum within my store:

    http://shoppingcart.djangobooks.com/forum

    The forum loads fine. However, when I click on ANY link it opens the new page but then quickly redirects me back to the main page.

  • meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    you want to put your name of your webroot in. FALSE is the same as not even putting it in the config.

    I tired this, is it correct?

    $Configuration['Garden']['WebRoot'] =  /home/gypsypicking/djangobooks.com/forum/
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok, well we have a list of issues to deal with.

    We changed the js to target self , that worked to open the links in the iframe but they auto redirect to the index.
    Usually when Vanilla redirects to the index is after sign in or sign out.The code we changed has to do with this action. I think . As pergerine stated before,

    changing this

    if (isHttp && href.substr(0, webroot.length) != webroot)

    to this

    if (isHttp && href.substr(0, webroot.length) != webroot) {
           var subwebroot =   href.substr(0, webroot.length)
      console.log(subwebroot);
     console.log(webroot);
    

    inside this

     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) {
    

    if I understood peregrine correctly ....

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited December 2013

    the root is the first folder in your domain.

    if your forum was in the root of the domain , then it would be

    http://www.djangobooks.com/

    if the forum is in a subdirectory of the domain

    http://www.djangobooks.com/forum

    however anything inside the subdirectory /forum is inside the root of this subdirectory.

    so in a sense the forum is also a root directory for the files inside.

    **You need to change the name of the link of the embed to forum1 or another name.

    http://shoppingcart.djangobooks.com/forum1

    I experienced this in a wordpress install, the link on the menu to go to the embed said forum and it redirected to the standalone. I changed the name of the link to forum1 and it worked. Please try that.**

  • meshugymeshugy Musician/Hacker ✭✭

    Ok, I edited the embed_local.js by replacing:

    if (isHttp && href.substr(0, webroot.length) != webroot)

    to this

    if (isHttp && href.substr(0, webroot.length) != webroot) {
            var subwebroot =   href.substr(0, webroot.length)
            console.log(subwebroot);
            console.log(webroot);
    

    Dreamweaver said there was a syntax error and when I uploaded it the site no longer embedded.

  • meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder said:
    $Configuration['Garden']['WebRoot'] = "/"

    Ok, I tried:

    $Configuration['Garden']['WebRoot'] = "/";
    $Configuration['Garden']['StripWebRoot'] = FALSE;
    

    I still have the problem of the links redirecting back to the main page.

    BTW, I should reiterate that for some reason when I view the embedded forum with Explorer I don't have the problem of the links redirecting back to the main page.

Sign In or Register to comment.