Isso Comment Sort Order

Isso Comments sort order is old first - not ideal if you have more than 10 comments, specially if you paginate and the new comments sort of disappears from view on the last page.

Strangely there is no setting to change that. After some digging this github post - it said:

A quick and dirty workaround: add 'asc': 0 here:

https://github.com/posativ/isso/blob/1633d9261ec9877358cda7acc7d78ecb9b09562c/isso/views/comments.py#L752#L757

It simply adds a line of code in the comments.py

I use Docker, so this is how I did it with putty SSH:

This line will copy comments.py from the Docker environment to the folder you are in now (ideally /var/lib/isso). Note the dot after comments.py!

1
docker cp <container name or ID>:/isso/isso/views/comments.py . 

Next you find add ‘asc’: 0` - for my 2024 (isso 0.13 I guess) version it was line 852 - note the comma at the ending one line above. I added it with nano.

849
850
851
852
853
args = {
    'uri': uri,
    'after': request.args.get('after', 0),
    'asc': 0  
       }

Save it, and upload it back to into the Docker fence:

1
docker cp comments.py <container name or ID>:/isso/isso/views/comments.py 

Last step, reload the container….

1
docker restart <container name or ID> 

Your comments should now sort newest first.