#20 Deleting "latest" newspaper issue won't reset "latest" link

Incorrect_behavior
closed-fixed
Benjy Thomas
None
5
2000-11-19
2000-11-02
Benjy Thomas
No

[Note: this bug is for functionality present in 0.7.2 which has not been released as of this writing.]

If you create and publish a newspaper edition which is also the most recent edition, a link is made from "latest" to the newspaper directory. However, if one later deletes that same issue using the web interface while it is still the "latest" edition, the link is not then switched to the most recent published issue. Instead it still points to the directory for the deleted issue.

Ok, since I caused this one when I added the code to create the link to the latest issue, I was planning to patch up the appropriate C files on the .cgi side. However, it looks like dcm is going to publish 0.7.2 before I finish up the patch, so I wanted to get something in the bug system so that people are aware of this behavior (In practice, this breakage should not be encountered very often).

David, I know what portions of the code need to be changed, but will not be able to even think about it until this test block is over next Friday (11/10). If you do not want to take it, please assign the bug to me and I will deal with it then.

Discussion

  • David C. Moore
    David C. Moore
    2000-11-03

    • assigned_to: nobody --> dmoore
     
  • David C. Moore
    David C. Moore
    2000-11-03

    • assigned_to: dmoore --> benjy
     
  • David C. Moore
    David C. Moore
    2000-11-19

    • status: open --> closed-fixed
     
  • David C. Moore
    David C. Moore
    2000-11-19

    Okay. This is now fixed. My approach was the following:

    1. Change publishnews to only update the archives and latest link if you run it without arguments.

    2. When an edition is deleted, its files are removed, the database updated, and then publishnews is run to correct the latest link and the archives.

    This is an adaptation of your submitted patch.