[Bug] Sorting parts via headers returns non-valid list #145

Closed
opened 2026-03-24 18:42:10 +01:00 by bricktracker_enjoyer · 1 comment

Description

When I click a table header Damaged to sort my parts the image and part color (part A - wrong) does not match the rest of part (part B - correct) properties. Clicking on the part B name redirects to part A page with its own, correct properties.

Steps for reproduce

  1. Mark part as damaged.
  2. Go to parts.
  3. Click on the table header "damaged" 3 times to obtain result where more damaged parts are displayed higher on the list.
  4. The first part is presented in "non-valid" way.

Expected behaviour

The part list should be presented in the same way as if I sort the table via Sort submenu with Damaged button. All part properties should match this part.

Current behaviour

The image and part color (part A - wrong) does not match the rest of part (part B - correct) properties.

Environment:

Running version 1.3.1 via docker-compose with own .env and served via reverse proxy.

Screenshots

First is non-valid: Gray Chain 16L is presented as Red Axle Hose, Soft 7L.

Second is valid, sorted via button from sort section.

Impact

This is only a minor bug, there is second method for sorting that still works.

# Description When I click a table header Damaged to sort my parts the image and part color (part A - wrong) does not match the rest of part (part B - correct) properties. Clicking on the part B name redirects to part A page with its own, correct properties. # Steps for reproduce 1. Mark part as damaged. 2. Go to parts. 3. Click on the table header "damaged" 3 times to obtain result where more damaged parts are displayed higher on the list. 4. The first part is presented in "non-valid" way. # Expected behaviour The part list should be presented in the same way as if I sort the table via Sort submenu with Damaged button. All part properties should match this part. # Current behaviour The image and part color (part A - wrong) does not match the rest of part (part B - correct) properties. # Environment: Running version 1.3.1 via docker-compose with own .env and served via reverse proxy. # Screenshots First is non-valid: Gray Chain 16L is presented as Red Axle Hose, Soft 7L. Second is valid, sorted via button from sort section. # Impact This is only a minor bug, there is second method for sorting that still works.
Owner

Thanks for the bug report!

This is the same root cause as #136. A data corruption issue with DataTables client-side pagination when mixing header clicks and sort buttons. This has been fixed in the upcoming 1.4 release, where sort buttons now sync with the DataTables header state to prevent misaligned images, colors, and links.

Version 1.4 is available for testing using the Docker tag pre-1.4.

To test release, update your compose file with the new tag.

Backup Your Database Before Upgrading!

This release includes database migrations (v20 -> v27) with NO automatic rollback capability.
It is recommended to make a copy of your install and test on that.

# Create a new test folder
mkdir bricktracker-test                                                                                                                                                                       
cd bricktracker-test

# Copy your compose.yaml
cp /path/to/original/compose.yaml .

# Copy your data folder (includes database)                                                                                                                                                   
cp -r /path/to/original/data ./data
                                                                                                                                                                                              
# Update compose.yaml image to: gitea.baerentsen.space/frederikbaerentsen/bricktracker:pre-1.4
# Then start the test instance
docker compose up -d

OR manually download a copy of your database from the admin page.

Closing the issue but let me know if this doesn't fix your issue and feel free to reopen.

Thanks for the bug report! This is the same root cause as #136. A data corruption issue with DataTables client-side pagination when mixing header clicks and sort buttons. This has been fixed in the upcoming 1.4 release, where sort buttons now sync with the DataTables header state to prevent misaligned images, colors, and links. Version 1.4 is available for testing using the Docker tag `pre-1.4`. To test release, update your compose file with the new tag. # Backup Your Database Before Upgrading! This release includes database migrations (v20 -> v27) with NO automatic rollback capability. It is recommended to make a copy of your install and test on that. ```bash # Create a new test folder mkdir bricktracker-test cd bricktracker-test # Copy your compose.yaml cp /path/to/original/compose.yaml . # Copy your data folder (includes database) cp -r /path/to/original/data ./data # Update compose.yaml image to: gitea.baerentsen.space/frederikbaerentsen/bricktracker:pre-1.4 # Then start the test instance docker compose up -d ``` OR manually download a copy of your database from the admin page. Closing the issue but let me know if this doesn't fix your issue and feel free to reopen.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FrederikBaerentsen/BrickTracker#145