Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add props to alias query #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MillironX
Copy link

May fix #11

There is an edge case where the page that aliases point to was created after the page with the name of the alias, giving the alias pointer page a lower number and therefore selected first in queries.

An easy way (but not foolproof) way to reproduce this problem would be to create a page in the plural (e.g. [[people]]), then decide to make a singular page as the main page (e.g. [[person]] with alias:: people). Any other sort of renaming or reassigning could lead to this edge case, too.

This fix works by assuming that only the page that all other aliases point to contains any properties. By querying for the mere presence of properties, we can deduce which page all the others are aliases of.

Examples

v1.15.16 This PR
species card pre image species card post image
cattle pre image cattle post image

There is an edge case where the page that aliases point to was created
_after_ the page with the name of the alias, giving the alias pointer page
a lower number and therefore selected first in queries.

An easy way (but not foolproof) way to reproduce this problem would be to
create a page in the plural (e.g. `[[people]]`), then decide to make
a singular page as the main page (e.g. `[[person]]` with
`alias:: people`). Any other sort of renaming or reassigning could lead to
this edge case, too.

Previously, this query worked by assuming that the first page created would
have all other pages be aliased to it later.

This fix works by assuming that _only_ the page that all other aliases
point to contains any properties. By querying for the mere presence of
properties, we can deduce which page all the others are aliases of.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugs: Hierarchy coloring and inheritance from an aliased page
1 participant