<!>Bugs, Requests, and Changes (2016-10-09 01:54:30)
Bugs, Requests, and Changes
Anthologica Universe Atlas / Forums / Site Help and Bug Reports / Bugs, Requests, and Changes / <!>Bugs, Requests, and Changes (2016-10-09 01:54:30)

? Rhetorica Your Writing System Sucks
posts: 1292
, Kelatetía: Dis, Major Belt 1
message
Right, you're really prying up some of the wallpaper here. Let's see what I can do about some of them:

a wiki that simply doesn't look like one.

Correct. Almost correct. Cadre is a recursive wiki; every page must have a unique parent/title combination. Like a filesystem, you can't have two files with the same name in one directory. (And everything is potentially a directory.) Forum posts use a different workaround; every single one has its timestamp encoded as part of its title to ensure it's unique. Your post is titled Bugs, Requests, and Changes (2016-10-03 17:33:57) , and if there were a conflict, a random number would be appended by the Annie-specific forum code to address this.

especially if there is only one namespace (and I'm presuming there is, because you don't give one in the URI

There actually is a way of referring to page titles with context, but no code does this and it's ugly internally. http://anthologi.ca/users/rhetorica will look for a page called 'users' with a child called 'rhetorica', which allows semi-unique title referencing for pages that might otherwise be masked by lower-IDed ones with the same title. This is still handled by index.star, as you'll note you get redirected to a page with a question mark in the URL.

When we get to the matter of dictionary entries, is necessarily, well, necessary to be able to create two things with the same title, and the way in which the site handles this...

This is gracefully handled by the use of page parents to delimit namespaces. If you absolutely need to have multiple entries with the same name in one dictionary, there's some code to automatically add <!>1, <!>2, <!>3, etc. after the name, which is visually represented as (1), (2), (3), etc.

Instead of prompting you for a page name and then giving you the fields for the page content, it creates an empty post with the title "Untitled Post" and then gives you a screen for editing that post.

This is an interface blemish and can be fixed. "Post without title" was the habitual design choice in very early (2009-2010) Cadre templates because I thought it was really slick to be able to embed the edit mode of the child back when I didn't have an easy shortcut for adding page redirects. This code is definitely overdue for replacement, as it creates unexpected and undesirable outcomes during interface exploration. (Many Annie blogs have ended up with blank Untitled Entry posts over time.) There are a number of solutions to this problem, such as manual title entry prior to prompting (typical of templates based on the venerable Abstract List, such as the Dictionary) or duplicating the edit mode code into the parent template (which is the solution used for blog comments and forum posts.) In general, inconsistency like this in an interface is evidence that true code reuse is scarce.

On the other hand, I'd expect given this model that the URL I get sent to after the first screen be e.g. http://anthologi.ca/?id=257839&mode=edit. But it's not, it's just http://anthologi.ca. Is there rerouting involved here?

This is an HTTP thing. Because the page is submitted with what's called the POST method (rather than the GET method), all of the parameters (the stuff after the ?) are passed using a different field instead of the URL field. Both the URLs http://anthologi.ca/ and http://anthologica/?id=257839&mode=edit are handled by one script, http://anthologi.ca/index.star.

One odd behaviour which I don't think was intentional is, if you change a page title and hit 'save', the SUCCESS screen has the *old* page title and not the new one.

This is a bit of a dumb detail; the page's title is cached for display prior to being updated. There are several different ways for Cadre to change the metadata of a page, and few of them update the $pagetitle variable actually used by the template. I'm pretty sure I could fix this.

Another odd behaviour is, if you rename an article to the same title as an existing article, then it won't be renamed, but all of the content will be lost.

I'm not certain what the deal here is; that's a genuine bug report. It probably has something to do with extended object data (containing the source page's revision history) getting transferred to the target page.

I'd honestly be willing to do the work to make them better. If only for my own benefit.

...No one who says this is ever telling the truth.

But, start here: http://code.rhetori.ca/Writing_Templates