#94 topic editor fixes

closed-fixed
Rob Malda
None
5
2004-11-09
2004-07-21
Chris Nandor
No

* make work like before
* delete forces choosing replacement
* parenting could be hard
* rest basically the same
* must re-render

Discussion

  • Chris Nandor
    Chris Nandor
    2004-07-21

    • assigned_to: pudge --> jamiemccarthy
     
  • Chris Nandor
    Chris Nandor
    2004-07-21

    Logged In: YES
    user_id=3660

    OK, this is basically done. It works like before and everything. Still left
    to do:

    * replacement topic works, but I need to make it not have a default choice
    ... jamie, what tables do i need to replace in? right now i replace the
    deleted topic with the replacement in stories and story_topics_chosen. any
    other places? what about forcing story_topic_rendered to re-render if i
    changed it?

    * the re-rendering is still not done, no solution at this point ... jamie,
    anything we can do at all for this at this stage, some sort of stopgap
    measure?

     
  • Jamie McCarthy
    Jamie McCarthy
    2004-07-22

    Logged In: YES
    user_id=3889

    I don't know exactly what you mean by "replacement topic" or "default
    choice," so I have no advice yet on that problem.

    As for re-rendering stories... I can code this up in a few hours but I am
    busy with other things...

    The stopgap would be to re-run the utils/convertDBto200406_render
    script after all changes are done. IIRC that took about an hour on the SCL
    sites. The sites would still be usable while it ran, though homepages
    might look a little goofy until it completed.

     
  • Chris Nandor
    Chris Nandor
    2004-07-22

    Logged In: YES
    user_id=3660

    [10:27:46] <jamie> UPDATE topic_parents SET
    parent_tid=$replacement WHERE parent_tid=$deleted;
    [10:28:29] <jamie> ^^ note that trusts you not to replace a topic
    with one underneath it, which would create a loop in the topic tree, which
    would probably make for infinite loops in Slash
    [10:28:47] <pudge> yow
    [10:29:09] <pudge> well, i can check for it myself, and then just
    delete parents otherwise?
    [10:29:37] <pudge> or maybe abort and say "pick another"?
    [10:34:58] <jamie> I would abort with an "X can't replace Y
    because it's a child of Y" error

    [10:35:13] <jamie> 1:30:13:jamie: apart from that, I think any
    table with a "tid" column -- with the possible exception of
    story_topics_rendered since it might create duplicate rows, but you could
    do that as an UPDATE IGNORE story_topics_rendered, and just ignore the
    dupes
    [10:35:13] <jamie> 1:32:02:jamie: so: journals, pollquestions
    (named topic, not tid), skins (though probably not the BEST idea to delete
    a nexus, it could be done), stories, submissions

    [10:37:19] <pudge> you know, i think we just should hold off on
    deleting topics via UI for now
    [10:37:27] <pudge> 1+ days is not enough time to do this right
    [10:38:11] <jamie> oh, UPDATE IGNORE is wrong; you'd need to
    DELETE, then INSERT IGNORE
    [10:38:18] <jamie> which is also the procedure for s_t_c, yes.

    [10:39:18] <jamie> (reason delete/insert-ignore is: the existing
    topic's weight should take precedence over the weight assigned to the
    deleted topic, since the deleted topic can never be a parent of the
    replacement...)
    [10:38:25] <pudge> right
    [10:38:28] <jamie> hey, I tried to warn y'all this was tricky :)
    [10:38:31] <pudge> right
    [10:38:41] <pudge> i am gonna put these notes in, and maybe
    even implement some of it
    [10:38:51] <pudge> but won't enable it from the UI
    [10:39:18] <jamie> (reason delete/insert-ignore is: the existing
    topic's weight should take precedence over the weight assigned to the
    deleted topic, since the deleted topic can never be a parent of the
    replacement...)

     
  • Chris Nandor
    Chris Nandor
    2004-07-22

    • assigned_to: jamiemccarthy --> pudge
     
  • Chris Nandor
    Chris Nandor
    2004-07-22

    • priority: 8 --> 5
     
  • Chris Nandor
    Chris Nandor
    2004-07-23

    Logged In: YES
    user_id=3660

    In addition to re-rendering and deletion still needing to be finished, we
    also need to add a box where we list the *children* and allow them to be
    removed.

    Hm, do we need to do any re-rendering or anything else when we remove
    or add a parent or child, apart from just updating the tree modified var?

     
  • Chris Nandor
    Chris Nandor
    2004-07-23

    Logged In: YES
    user_id=3660

    [08:40:37] <pudge_> jamie: do we need to do any re-rendering or
    anything else when we remove or add a parent or child of a topic, apart
    from just updating the tree modified var?
    [08:45:09] <jamie_> pudge, yes, you have to do re-rendering when
    you do that
    [08:46:13] <pudge_> which we don't yet know how to do?
    [08:48:30] <jamie_> we talked about this already
    [08:48:50] <jamie_> as I said, the easiest thing to do is get the
    topic tree how you want it, then re-run utils/convertDBto200406_render
    [08:48:57] <jamie_> to re-render the story_topics_rendered table
    [08:49:06] <pudge_> i mean, don't know how to do in the actual
    Slash code.
    [08:49:17] <jamie_> right...

    [08:49:48] <jamie_> it's relatively simple...
    [08:49:55] <jamie_> create a table story_renderdirty
    [08:50:02] <jamie_> or story_dirtyrender, those would be my name
    suggestions :)
    [08:50:14] <jamie_> schema the same as story_dirty, which is to
    say, just one primary key column
    [08:51:20] <jamie_> then whenever you change any topic, do a
    INSERT INTO story_renderdirty SELECT DISTINCT stoid FROM
    story_topics_chosen WHERE tid IN (that topic and all its children)
    [08:51:57] <jamie_> then write a task that re-calls (I forget the
    method's name) setStoryPrimaryskidAndTopic and does the renderTopic
    and writes that all into stories and story_topics_rendered
    [08:52:33] <jamie_> whatever admin.pl does on a save and update,
    to get stories.primaryskid, stories.tid, and story_topics_rendered set up
    correctly, that's what this new task has to do for every stoid in
    story_renderdirty
    [08:52:42] <jamie_> and then remove rows from story_renderdirty
    once they're processed.

     
  • Chris Nandor
    Chris Nandor
    2004-11-08

    • assigned_to: pudge --> cmdrtaco
    • status: open --> open-fixed
     
  • Rob Malda
    Rob Malda
    2004-11-09

    • status: open-fixed --> closed-fixed