Help me identify this movie (set in Victorian England, based on a novel written by a little girl)

Circa 1993, I saw on home video a movie set in late Victorian England that was supposedly based on a novel written by a girl of around 12 years old. (As a framing device, the movie opened and closed with the girl sitting and penning the novel at her desk).

It was a fairly humorous story about a middle-aged gentleman who fell in love with his young ward, IIRC named Ethel (if not Ethel, then surely Edith). However, she ended up being courted by, and marrying, a different gentleman, who was better looking and likely both younger and more charming. That’s not a very detailed plot description; I remember these further details:

-At one point, at Ethel’s prompting, the protagonist tells the other gentleman the joke: “When is a door not a door? When it’s a jar!” (This was my first encounter with the joke; I only understood the pun much later).

-There would have been a subplot of some kind; at any rate, I recall the protagonist meeting the Prince of Wales (later King Edward VIII) at one point.

-There is a voiceover at the end which gives an epilogue, with the novellist mentioning, among other things, that in his later years, the protagonist found comfort in prayer or something to that effect.

That’s all I remember. What was it that I saw?

You may be thinking of The Young Visiters by Daisy Ashford. Note the misspelling in the title of the novel. She wrote it when she was 9 in 1890, but it wasn’t published until 1919. Ashford only discovered the manuscript of the novel among the things her mother had left when she died. Ashford hadn’t thought much about the book since writing it when she was 9. She reread the book and thought it was interesting, so she loaned it to a friend. The friend read it and passed it on. It kept passing around until it reached some people who wanted to publish it.

Since then it has had a cult reputation as a weird story with bizarre mistakes about many things in it. The cult is so big that it has been made into a movie twice. It’s considered a strange joke among the fans of the novel:

Yes, that’s it. Thanks! The movie I saw was a 1984 version. I see that Ethel was played by Tracey Ullman.

P.S. Above I wrote Edward VIII. I meant VII.