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.

Signing in from a discussion page requires reload to take effect

After tapping the sign-in button from a discussion page (rather than the index), then signing in, the sign-in takes no effect - sign-in/register buttons remain visible. One must either navigate away or reload the page in order to see the signed-in version of the forum.

I can't reproduce this on the open.vanillaforums.com forum, so I guess it's been fixed here already.

Comments

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    I experienced the same issue

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @Linc / @charrondev - have you seen this too? I only nticed that once I logged off (because I tend to keep my session logged on it took time to realize this issue)

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff
    edited February 2019

    I'm sorry I'm unable to reproduce this on either my localhost or our infrastructure. I'll note this site open.vanillaforums.com is currently running the exact version that we released to open source.

    I can't really do much without being able to reproduce the issue. Do you have a site deployed somewhere that I could test this and could you share some information about your login setup?

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭
    edited February 2019

    Thanks for the fast feedback -- I am running in our intranet without the ability to demonstrate. Perhaps @MichaelTyson can help here (and he couldn't reproduce it in open.vanillaforums.com either)?

  • Sure - you can see it on forum.audiob.us. Any particular info you'd like to know about the setup?

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    If yo give @charrondev an ID he can possibly recreate the issue (send it via pm)

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    That would definitely be helpful.

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    An older thread here: https://open.vanillaforums.com/discussion/29707/login-successful-but-not-showing-so-have-to-refresh#latest.

    I'm filing an issue on our core repository for this, but as it doesn't affect infrastructure it doesn't our infrastructure and I'm not really knowledgeable enough in this department to fix it myself I'm not going to be able to pull other team members form there normal time working on our product goals. This would be a good opportunity for someone from the open source community to make a contribution I think.

  • R_JR_J Ex-Fanboy Munich Admin

    @charrondev When loading a discussion on Michaels page I see a JavaScript error on the page in the custom.js but that file is minimized. It would be great if it would come with a map file.

    @MichaelTyson here is what I see when I visit a discussion in your forum: the JavaScript console shows "TypeError: u is null" in custom.js

    custom. js is the JavaScript file from the Keystone theme. When I run the custom.js through a beautifier, I find this as the place where "u" is defined as the .mobileMeBox and later on (when the error appears) it gets assigned an event listener

       $(() => {
           (function() {
               const e = document.querySelector("#menu-button"),
                   t = document.querySelector(".js-nav"),
                   n = document.querySelector(".js-mobileMebox"),
                   u = document.querySelector(".mobileMeBox-button"),
                   c = document.querySelector(".mobileMebox-buttonClose"),
                   s = document.querySelector("#MainHeader");
    
               function l(e) {
                   e.style.height === i ? function(e) {
                       e.style.height = e.getAttribute(r) + "px"
                   }(e) : a(e)
               }
    
               function a(e) {
                   e.style.height = i
               }
    
               function d(e) {
                   e.classList.add(o), e.style.height = "auto";
                   const t = e.getBoundingClientRect().height;
                   e.setAttribute(r, t.toString()), a(e), e.classList.remove(o)
               }
               d(n), d(t), window.addEventListener("resize", () => {
                   requestAnimationFrame(() => {
                       d(n), d(t)
                   })
               }), e.addEventListener("click", () => {
                   e.classList.toggle("isToggled"), s.classList.toggle("hasOpenNavigation"), a(n), l(t)
               }), u.addEventListener("click", () => {
                   u.classList.toggle("isToggled"), s.classList.remove("hasOpenNavigation"), e.classList.remove("isToggled"), a(t), l(n)
               }), c.addEventListener("click", () => {
                   a(n)
               })
           })(), $("select").wrap('<div class="SelectWrapper"></div>')
       })
    }]);
    

    Debugging is complicated but I assume that adding all those events fails for guests. But that might be of no interest since it is connected to the me module which is of no importance at that time.


    The other thing I see is closer connected to the root problem: the page is served from the cache. You can see that by looking at the network traffic. As far as I know that is a server configuration issue. Sadfully I'm no expert at that. Can you share your htaccess?

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    I decided to test switching away from keystone to baseline and see if this happens in baseline. Turns out it doesn't which is sort of affirmation that the problem is Keystone related. For full disclosure, my test was on a landscape mode tablet with browser set to "desktop mode" (I saw the side panel) because I am away from the office and my desktop.

  • R_JR_J Ex-Fanboy Munich Admin

    Well, at least I've tried 😀

    The next step would be to use a slightly altered version of that custom.js and deal with that potential error by replacing u.addEventListener("click", () => {u.classList.toggle("isToggled") with if (u) {u.addEventListener("click", () => {u.classList.toggle("isToggled")} - hope that this is correct js...

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    Wow I feel pretty dumb now.

    I should have a proper patch for this in today.

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff
Sign In or Register to comment.