Thursday, October 31, 2019
1 change · master
Resolved issues and error corrections
This fixes a routing cache issue that could make newly installed apps, such as Discuss, appear to have missing or unknown pages on a fresh database. The change ensures routing information is rebuilt correctly during installation and not incorrectly reused across databases.
Original PR description
Initial b6ed34e1 idea was to ensure that we always have _rewrite_len and _routing_map defined. Unfortunately, this is not always correct since class attribute defined dynamically are actually added in registry, and recomputed on each install. After b6ed34e1, after installing discuss on a fresh database without demo, all discuss routes will be unknown since None is already in _routing_map and thus routing_map is not recomputed. When routing_map is in registry class, the install will remove the _routing_map attribute, which will fix the problem.