#2415: turbokid reload templates problems
----------------------+-----------------------------------------------------
Reporter: xaka | Owner: chrisz
Type: defect | Status: new
Priority: normal | Milestone: 1.0.x bugfix
Component: TurboKid | Version: 1.0.9
Severity: normal | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by chrisz):
I can reproduce the second problems, and the first if I add the following
steps before loading the page with template B again:
* touch template A and change template C so that it has an error (e.g.
not well-formed)
* load template C again (displaying the error)
This is because by loading a correct template C the template A will be
reloaded again.
The first fix in the patch seems to be ok. The second fix does not seem to
be correct and will not fix the second problem.
The actual problem is that if you have the chain A -> B -> C and C
changes, then you must reload not only A and C (as it is currently done),
but also B, because after removing and reloading C, B cannot find the old
C any more. I fixed this by always reloading all bases if any of them
changes. This may be sometimes overkill, but I don't think it's worthwile
to elaborate the exact dependency chain.
Tests for the problem above need to create files and provoke mtime changes
on the file system, or create appropriate mock objects. I don't think it's
worth that effort, since Kid is outdated anyway, so we should not spend
much energy on !TurboKid, and !TurboKid never had any unit tests anyway. I
have just checked that the two problems above are solved by my patch, all
the TG 1.0 tests pass, and I have added some basic tests for !TurboKid now
which all pass. The changes are in r6984 and r6985.
Let me know what you think - if your're ok, I will create a new !TurboKid
release.
--
Ticket URL: <http://trac.turbogears.org/ticket/2415#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en