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 errors on tags page #156

Merged
merged 3 commits into from
Mar 2, 2023
Merged

Fix errors on tags page #156

merged 3 commits into from
Mar 2, 2023

Conversation

iPurpl3x
Copy link
Contributor

@iPurpl3x iPurpl3x commented Mar 2, 2023

When the tags page UI is extended and customized, the current code that tries to manipulate the virtual DOM doing thing like

markup.children[1].children[1].children[0].children = tag_tiles.map(...

might break because the indexes of children have changed.

This PR adds a safer and more flexible way of manipulating the virtual DOM using a recursive helper function that searches for a node with a certain class name.

Tested locally on the instance that was failing and everything seems to be fine.

While making this PR I realized there was strange (seemingly copy-pasted) comments and code that was referring to "knowledge base" even though this is the blog extension and not the knowledge base extension.

@iPurpl3x
Copy link
Contributor Author

iPurpl3x commented Mar 2, 2023

@luceos or @davwheat would you be able to merge this and tag a new version? The sooner, the better, as we (@glowingblue) have this error in production currently.

@davwheat davwheat merged commit 848b3f8 into v17development:master Mar 2, 2023
@iPurpl3x
Copy link
Contributor Author

iPurpl3x commented Mar 2, 2023

Thanks for merging @davwheat !

Could you also tag a new version, please?

@iPurpl3x
Copy link
Contributor Author

iPurpl3x commented Mar 2, 2023

Ah it's tagged now, thanks !

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.

2 participants