Spent some time fixing up the code for verifying and publishing articles that aren’t auto-published. Generally something I haven’t used, but started to play with it while working on another routine. Nothing members will notice but I did find a couple bugs to fix. Tags will now work properly. It uses the standard editor to publish articles. Lastly, it supports the standard status prompts.
Apparently when I added in the validation modal’s for a deletion, I left in the default heading. I’m not sure how I missed it saying “Modal Heading” in each of the forms. I corrected the heading as well as styled some of anchor tags differently. Nothing too noticeable but let me know if something doesn’t work for you.
I had a bit of fun today reworking the the updates for number of site features. For users, this will be mostly seen when you make a change to a race. Over time I’ll add the feature to other areas. The main goal was to avoid accidental changes when resubmitting a page. To fix that, I used an old—but new to me—pattern of Post-Redirect-Get.
Where I have updated thus far (Races, Programs and Changes), when you add/edit/delete an entry it will now redirect on completion. That redirect sends a response to tell you if the action was successful or not. The advantage of this solution is that it will no longer accidentally do a submit if you refresh the page.
Okay, finally got around to fixing the comment nesting today. Old process was adding too much depth that really didn’t work. This one limits to two deep and resets on new parent comment. Testing across multiple areas seemed to have fixed things.
Side note that I also continued to fix a few more stylistic and tag issues throughout the site. A couple CSS fixes today. One was to deal with the tag being deprecated. My earlier fixed worked on text, but not images. I worked around that with some custom styles that I generalized today to work with the [center] UBB code. At the same time, I fixed some underline issues with anchors where it wasn’t showing within articles correctly.
Again, there are still a few places where I might run into a gotcha. For now, though, things work as expected and are validating correctly.
I won’t try to list everything, but got around to doing some general site hygiene today. I cleaned up a some invalid HTML tags, CSS styles, RSS feed issues, and so on. Mostly little quirks that I hadn’t gotten around to fixing. I realized today that I still need to move some of the redundant code into separate routines. The CMS wasn’t designed for scale and I’m still moving stuff around to make it function better. Maybe someday I’ll get around to revamping the code completely.