gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

Adding pages to LeDatabase fails if the page type class is created after the database

Open chisandrei opened this issue 2 years ago • 3 comments
trafficstars

Adding pages with new page types to existing databases fails. LeDatabase>>#initialize uses the current existing page types to initialize its internal cache.

Screenshot 2023-06-13 at 14 01 20

Methods that locate pages will fail if the page type is not in the cache.

Screenshot 2023-06-13 at 14 02 33

chisandrei avatar Jun 13 '23 12:06 chisandrei

Duplicate of https://github.com/feenkcom/gtoolkit/issues/2546 ?

seandenigris avatar Jun 13 '23 12:06 seandenigris

@seandenigris yes related. We should update how the database reacts when pages with new types are added, to just add the new type to pagesByType without any error or need to reinitialise that array based on the current types

chisandrei avatar Jun 14 '23 15:06 chisandrei