1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

JS Error While Attempting Logout On Subdomain

Discussion in 'XenForo Development Discussions' started by TheBigK, Feb 26, 2013.

  1. TheBigK

    TheBigK Well-Known Member

    I'm posting this question on behalf of our developer. Our setup is as follows :-

    XF Installation: www.domain.com/community/
    Subdomain: subdomain.domain.com/ -> this is where the add-on will display pages.

    When the user is on the subdomain, logout doesn't work. Following JS error is thrown after clicking 'Log Out', instead of showing the overlay that asks for logout confirmation -

    Code:
    Attempted to call XenForo.OverlayLoader.show() for
    logout/  before overlay is created
     
  2. TheBigK

    TheBigK Well-Known Member

    Sorry for bumping, but just want to know if the question is complete. Is there any information I need to provide? Thanks!
     
  3. digitalpoint

    digitalpoint Well-Known Member

    Do other AJAX calls work for you on the sub-domain?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I'm not sure about the nature of that js error.

    Is your forum accessible via multiple subdomains? Normally you would enforce just one subdomain. If you need it to be accessible on multiple then be sure to change your cookie domain to work on all subdomains:

    http://xenforo.com/community/threads/xenforos-handing-of-cookie-domains.15260/#post-200173

    And when making this change you will probably also want to change the cookie prefix to invalidate existing cookies in the old scope to prevent possible overlap which can cause logout problems.
     
  5. TheBigK

    TheBigK Well-Known Member

    Unfortunately, nope. The ajax calls aren't working on subdomain. CSS runs on the subdomain; but JS URLs are all pointing to the main domain.

    The problem we're facing is the 'logout' pop-up isn't working; which we believe is a JS related issue. By the way, user stays logged in while browsing the sub-domain.
     
  6. digitalpoint

    digitalpoint Well-Known Member

Share This Page