Skip to content

Bug in items table sort #2722

Closed
Closed

Description

@objecttothis

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

  • Reporting an issue of an unmodified OSPOS installation
  • Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • Read the wiki
  • Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

  • OSPOS version is: 3.3.2
  • OSPOS git commit hash is: ca2907
  • PHP version is: 7.3.6
  • MySQL or MariaDB version is: 4.7.26
  • OS and version is: FreeBSD 11.2
  • WebServer is: Apache 2.4
  • Selected language is: English
  • (If applicable) Docker installation:
  • (If applicable) Installation package for the LAMP/LEMP stack is:

Bug

In the latest master on an upgraded database when I click any of the column headers TWO times the view changes to no items to display. The expected behavior is that the table would sort ascending and descending on any column, but instead when clicking a second time it returns no items to display. Nothing is in the search box. The demo is down, so I couldn't test it on another box. Can anyone else running the ca2907 master confirm this is a bug?

Activity

  1. added this to the 3.3.2 milestone on Feb 14, 2020
  2. jekkos commented on Feb 14, 2020

    @jekkos
    Member

    If you have 'no items', then that probably means the server had an internal error, can you check the http status code and verify if any logging is available?

  3. objecttothis commented on Feb 14, 2020

    @objecttothis
    MemberAuthor

    @jekkos upon investigating further it appears to be working but there is anywhere between a 4 and 10 second delay where it says "no items to display". I just wasn't waiting long enough. I wonder if we shouldn't do some optimization of the sort or if we could change the display while its waiting to something more indicative of the fact that it's sorting.

  4. objecttothis commented on Feb 14, 2020

    @objecttothis
    MemberAuthor

    There is definitely something funny going on with the sort though. When I try to sort by any of my attributes it changes the view, but isn't actually sorting them. You can see from the attached image that I've sorted by my "Category" attribute (not to be confused with Category in the items table) but it's clearly not sorted by the attribute.

    Annotation 2020-02-14 113249

  5. daN4cat commented on Feb 23, 2020

    @daN4cat
    Collaborator

    @jekkos , have you looked into this attribute sorting issue?

  6. jekkos commented on Feb 25, 2020

    @jekkos
    Member

    Not yet, it's on my list though. I fixed the build first and have another branch pending (that's mostly finished but still needs final validation)

  7. added a commit that references this issue on Mar 9, 2020
  8. jekkos commented on Mar 9, 2020

    @jekkos
    Member

    I have disabled sorting for now, I'll try to see if I can come up with a solution to make it work, but it does not seem to be straightforward.

  9. modified the milestones: 3.3.2, 3.4.0 on Mar 21, 2020
  10. removed this from the 3.4.0 milestone on Dec 10, 2022
  11. 4 remaining items

  12. added 5 commits that reference this issue on Mar 18, 2026
    b1421e5
    9cbb18c
    7b9bd66
    a38d40f
    7887460
  13. jekkos commented on Apr 1, 2026

    @jekkos
    Member

    Fixed by PR #4060 which added sanitizeSortColumn() method to validate sort columns against valid column headers. This prevents SQL injection and fixes the bug where invalid sort parameters caused items to not display. Closing as fixed.

  14. added a commit that references this issue on Aug 21, 2026
    953147a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions