After one of the last updates I'm not able to sort on activity under settings -> users #3424

Closed
opened 2026-02-05 06:40:48 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @mschoon85 on GitHub (Jan 4, 2023).

Describe the Bug

Hi @ssddanbrown

After one of the last updates I'm not able to sort on activity under settings -> users. This was a very usefull feature to see if any user is logged in and working on something. This way I know if I can perform an update on Bookstack mid day instead of waiting for the evening when no users are logged in.

Kind regards,

Michel

Steps to Reproduce

  1. Go to settings
  2. Go to users
  3. No sort options available

Expected Behaviour

Sort options to be available

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

22.11.1

PHP Version

No response

Hosting Environment

Windows Server 2022 with Apache webserver

Originally created by @mschoon85 on GitHub (Jan 4, 2023). ### Describe the Bug Hi @ssddanbrown After one of the last updates I'm not able to sort on activity under settings -> users. This was a very usefull feature to see if any user is logged in and working on something. This way I know if I can perform an update on Bookstack mid day instead of waiting for the evening when no users are logged in. Kind regards, Michel ### Steps to Reproduce 1. Go to settings 2. Go to users 3. No sort options available ### Expected Behaviour Sort options to be available ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version 22.11.1 ### PHP Version _No response_ ### Hosting Environment Windows Server 2022 with Apache webserver
OVERLORD added the 🐛 Bug label 2026-02-05 06:40:48 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 4, 2023):

Hi @mschoon85,
Do you not see the following circled control on your instance?:

Screenshot 2023-01-04 at 18 10 43
@ssddanbrown commented on GitHub (Jan 4, 2023): Hi @mschoon85, Do you not see the following circled control on your instance?: <img width="837" alt="Screenshot 2023-01-04 at 18 10 43" src="https://user-images.githubusercontent.com/8343178/210621820-f42e2888-fa01-4854-b4f3-de8c94fffd2e.png">
Author
Owner

@mschoon85 commented on GitHub (Jan 5, 2023):

Hi @ssddanbrown,

Unfortunately this sort option is not there. Also, compared to your screenshot, it does not say Users at the top en there is no 'ADD NEW USER' button (might be because we are using LDAP, so I don't need it).

image

@mschoon85 commented on GitHub (Jan 5, 2023): Hi @ssddanbrown, Unfortunately this sort option is not there. Also, compared to your screenshot, it does not say Users at the top en there is no 'ADD NEW USER' button (might be because we are using LDAP, so I don't need it). ![image](https://user-images.githubusercontent.com/96066244/210727764-2226f0ab-2684-4169-b1af-f0a2065e1537.png)
Author
Owner

@mschoon85 commented on GitHub (Jan 5, 2023):

Hi @ssddanbrown,

I just found out that this is caused by the HTML head I added under settings:

<style>
	header a[href$="/books"] {
		display: none;
	}
  
  header a[href$="/shelves"] {
		display: none;
	}
    
#  .grid.no-row-gap {
#    grid-row-gap: 0;
#    display: none;
#}

  .list-heading {
  display: none;
}
  
    .list-sort-container {
  display: none;
}
  
  
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/luminous-lightbox/2.3.5/luminous.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/luminous-lightbox/2.3.5/luminous-basic.min.css" rel="stylesheet">
<script>
window.onload = function() {
  var images=document.querySelectorAll("main a img");
  for (image of images) {
    new Luminous(image.parentElement);
  }
}
</script>

<script>
  document.addEventListener("DOMContentLoaded", function(){
    var links = document.links;

    for (var i = 0, linksLength = links.length; i < linksLength; i++) {
       if (links[i].hostname != window.location.hostname) {
           links[i].target = '_blank';
       }
    }
  });
</script>

<style>
.text-muted.break-text {
    display: none;
}
</style>


<style>
.active-restriction {
    display: none;
}
</style>

<style type="text/css">
	.entity-meta-item:has(svg[data-icon="user"]) {
		display: none;
	}
</style>

I would like to keep the above if possible. Can we add new HTML code to make the sort visible again? It was working with previous versions of Bookstack.

I guess this part is the cause:

.list-sort-container {
  display: none;
}

Because I don't want users to see sort on the front side. It used to be separated from the sort function on the user page apparently.

@mschoon85 commented on GitHub (Jan 5, 2023): Hi @ssddanbrown, I just found out that this is caused by the HTML head I added under settings: ``` <style> header a[href$="/books"] { display: none; } header a[href$="/shelves"] { display: none; } # .grid.no-row-gap { # grid-row-gap: 0; # display: none; #} .list-heading { display: none; } .list-sort-container { display: none; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/luminous-lightbox/2.3.5/luminous.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/luminous-lightbox/2.3.5/luminous-basic.min.css" rel="stylesheet"> <script> window.onload = function() { var images=document.querySelectorAll("main a img"); for (image of images) { new Luminous(image.parentElement); } } </script> <script> document.addEventListener("DOMContentLoaded", function(){ var links = document.links; for (var i = 0, linksLength = links.length; i < linksLength; i++) { if (links[i].hostname != window.location.hostname) { links[i].target = '_blank'; } } }); </script> <style> .text-muted.break-text { display: none; } </style> <style> .active-restriction { display: none; } </style> <style type="text/css"> .entity-meta-item:has(svg[data-icon="user"]) { display: none; } </style> ``` I would like to keep the above if possible. Can we add new HTML code to make the sort visible again? It was working with previous versions of Bookstack. I guess this part is the cause: ``` .list-sort-container { display: none; } ``` Because I don't want users to see sort on the front side. It used to be separated from the sort function on the user page apparently.
Author
Owner

@ssddanbrown commented on GitHub (Jan 5, 2023):

It was working with previous versions of Bookstack.

Yeah, such CSS customizations are not officially supported and can break on updates or have unintended side-affects.

Tweaking the problematic rule that you singled out to match the below may get what you want. There's no real distinction of these sort boxes user vs admin side but this scopes hiding the sort controls to the template that's mostly used within those common user-side views.

.tri-layout-middle  .list-sort-container {
  display: none;
}
@ssddanbrown commented on GitHub (Jan 5, 2023): > It was working with previous versions of Bookstack. Yeah, such CSS customizations are not officially supported and can break on updates or have unintended side-affects. Tweaking the problematic rule that you singled out to match the below may get what you want. There's no real distinction of these sort boxes user vs admin side but this scopes hiding the sort controls to the template that's mostly used within those common user-side views. ```css .tri-layout-middle .list-sort-container { display: none; } ```
Author
Owner

@mschoon85 commented on GitHub (Jan 6, 2023):

@ssddanbrown this does exactly what i need. Thank you so much again! Have a great weekend!

@mschoon85 commented on GitHub (Jan 6, 2023): @ssddanbrown this does exactly what i need. Thank you so much again! Have a great weekend!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3424