Splitting topics breaks existing upstream quotes


  • Banned

    Continuing the discussion from New user indicators and post counts:

    @dhromed said:

    splitting the thread broke the arrow links in my quote snippets of your post.

    Quote content:

    @codinghorror <a href="/t/via-quote/660/90">said</a>:<blockquote>This effect is unbelievably strong.</blockquote>
    

    The topic 660 was split to 757, so splitting should arguably replace all the same-topic quotes (for posts that were also moved) with the new topic id, and the new post id, like so:

    @codinghorror, post:xx, topic:yyy said:<blockquote>This effect is unbelievably strong.</blockquote>
    

    where xx is the new upstream post ID, and yyy is the new topic ID.

    Could be a bit complicated.



  • @codinghorror said:

    post id

    It's a post number, not a post ID.

    Actually, using a post ID would fix this -- posts keep their ID when they're moved, but not their post_number.


  • Discourse touched me in a no-no place

    @riking said:

    It's a post number, not a post ID.

    Actually, using a post ID would fix this -- posts keep their ID when they're moved, but not their post_number.

    If you were going to generate an ID, using a hash of the original author, content and posting date would be a good place to start. Sure, it'd be totally unreadable, but it wouldn't be for users…


  • Banned

    @riking said:

    using a post ID would fix this

    What do you think of this as an alternate format here @eviltrout? We have to support the old format for existing data.

    Although @riking I don't think we can tell if the post is in the current topic or not without running a query using only the post id.. so that's not exactly desirable.. note that quotes to other topics get the → arrow and upstream quotes get the ↑ arrow.



  • @codinghorror said:

    Could be a bit complicated.

    Man, inline nested quotes starting to sound real good right now.


  • Banned

    @codinghorror said:

    What do you think of this as an alternate format here @eviltrout? We have to support the old format for existing data.

    I am pretty certain the topic_id is used for various things too. We'd have to hunt them down and make sure they are all working correctly, and as you pointed out it might result in extra queries to discover the topic ids for posts.



  • Preserve the original post as a hidden post containing data for the new topic/post, when jumping to it have a flag that auto redirects to the new topic? You'd prevent a round trip to the database.


Log in to reply