Code Monkey home page Code Monkey logo

Comments (10)

altexa avatar altexa commented on July 17, 2024

image

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

This is the front page of the blog. As loaded by default.
Note recent posts list the two "what is backup software" posts (this is correct) - but the blog itself shows "Volume Shadow Copy" as the first post, while it should be third:

image

from chyrp-lite.

xenocrat avatar xenocrat commented on July 17, 2024

Perhaps your post "Volume Shadow Copy" is pinned? This would cause it to appear above other posts in the blog index and the admin area. The usual sort order for both blog and admin area is pinned DESC, created_at DESC, id DESC.

What happens to the sort order if you edit some of the other posts?

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

Thanks for your reply - nothing is pinned.

Here's an extract of the database:

image

and the rest of the lines:

image

The updated_at is only filled for the posts I modified...don't know if this is linked to the fact that everything was imported.

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

....or maybe the sort problem is that the pinned field was not updated when the data was imported, and hence is null...and the update sets it to 0, and null comes before 0 in a sort

from chyrp-lite.

xenocrat avatar xenocrat commented on July 17, 2024

Yes I think that may be the answer. Chyrp Lite will consider any “falsey” value as unpinned, but the database is prioritising null above 0 when it sorts the query results. The recent posts in the blog sidebar are not affected because the sort order for those results does not consider pinned status.

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

I'll update the DB manually, setting 'pinned' to 0 everywhere. Might be an idea (if possible) to set pinned to 0 on import, if not specified in the import file.

Thanks again

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

Confirmed, with a 0 in all lines, the sort is correct

from chyrp-lite.

xenocrat avatar xenocrat commented on July 17, 2024

Yes, I’m going to look into this later today. The import method is casting the pinned value from the XML document to boolean but the normal behaviour for added/updated posts is to cast the value to integer, and I think this is causing different handling when sent to the database. Thanks for the report!

from chyrp-lite.

altexa avatar altexa commented on July 17, 2024

The thanks are mine ;)

from chyrp-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.