Menu

#18 inconsistent folder state

open
nobody
5
2005-05-13
2005-05-13
No

2 bugs here, but quite similar.

1.

When a folder is created, only a draft version is created
in the database, and a live folder is created when an
item in the folder is published.

Now if I have a couple of unpublished items in a new
folder, and I publish one; until the publication completes
and the transaction is committed if someone publishes
the other article, each publication transaction creates a
live folder and so I end up with 2 live folders for one draft
folder.

Now, I cannot view any of the published items that are
in the folder due to an assertion failure. In old aplaws, I
cannot unpublish the items either and so the only way
to fix this is to hack into the database - moving an
article into another folder and then deleting the folder.
Fortunately, I think Aplaws+ allows me to unpublish the
items, so they can all be moved into another folder.

You may think this is unlikely to happen, but what has
happened with us is that some large articles take so
long to publish that the user opens another window and
sets off another publish transaction while the first one is
going.

2.

Item urls must be unique in a folder, and when you
create a new item this is validated. However this
validation is not carried out if you edit the url, and so
you can publish items with the same url. Now you can
no longer view any published items in that folder
because of an assertion failure. This is easy to fix, as
one item just needs to be renamed, but realising this is
your problem can be time consuming.

How unlikely is this? Well on our site, we have regular
newsletters which are all called eg dd/mm/yyyy
newsletter. Now because of a small bug in the javascript
that creates the item url in old aplaws, zeros are
stripped out as well as the / between numbers, and so
the url can look like 2325-newsletter. The preceding
number looks like nonsense so the users edit the url to
remove it and end up with several items all called
newsletter.

A fix for 2 would be easy. A fix for 1 is more difficult.
The applicatin doesn't know about a 2nd folder until the
db transaction commits - this really needs an extra
constraint on the database

Chris......

Discussion


Log in to post a comment.