Answered XenStaff page displays user activity as "Viewing unknown page"

Discussion in 'Forum Feedback' started by Assist, Dec 27, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Assist

    Show Spoiler

    [​IMG]

    I don't know if this is a bug (or even a bug) with the new forum update so I made a new thread.
     
  2. Offline

    ChipDev

    What were you last viewing..?
     
  3. Offline

    eyamaz

    This usually appears when you are viewing a page that other users can't view, like your account info. Due to how it is coded, for security, this also shows the same message to you about your own status even if its a page you can view.
     
  4. Offline

    Assist

    @ChipDev
    The XenStaff page.

    @eyamaz

    Notice how on this thread, my recent activity was correct. However, on the XenStaff page it displays it as "Viewing unknown page". Also note that I was previously not looking at my personal information, because I hopped over there from this thread.

    Edit: Sorry for the music, I had League of Legends client on in the background :p
     
    Last edited: Dec 28, 2014
  5. Offline

    eyamaz

    Interesting
     
  6. Offline

    lol768 Retired Staff

    This an issue with the addon not implementing the function required to change the session activity name 'viewing unknown page' to something meaningful. Easy fix:

    Find and open the XenStaff_ControllerPublic_Index class (located in $xfRoot/library/XenStaff/ControllerPublic/) and add a static getSessionActivityDetailsForList function:

    PHP:
    public static function getSessionActivityDetailsForList(array $activities)
    {
        return 
    "Viewing staff list";
    }
    Alternatively a phrase could be used (obviously this needs to be made in the ACP first):

    PHP:
    public static function getSessionActivityDetailsForList(array $activities)
    {
        return new 
    XenForo_Phrase('xenstaff_viewing_staff_list');
    }
    What about compatibility with upgrades? Isn't editing the addon's code bad?

    The addon in question (XenStaff) hasn't been updated in a long time (what looks like 3-4 years now) and the thread has been archived. Given the author has released an alternative with a different name and other features (https://xenforo.com/community/resources/icewind-staff.3629/) I think it's unlikely XenStaff is likely to be touched in the future.
     
    Assist likes this.
Thread Status:
Not open for further replies.

Share This Page