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

introduce a troubleshooting guide for Derby #541

Merged
merged 3 commits into from
May 30, 2024

Conversation

aconrad
Copy link
Contributor

@aconrad aconrad commented Jun 27, 2017

This is meant to be a guide to help Derby users to troubleshoot problems they may encounter.

* sorting lists on in `init()` might cause the output to be non-deterministic (like alphabetizing / capitalization). Basically a data "bug" would end-up generated different HTML.
* putting links in links, which has undefined behavior in HTML
* inserting a conditional `<div>` such as `{{if thisIsTrue}}<div>stuff</div>{{/if}}` without restarting the server
* Having a value with extra whitespace around it. Some browsers will split the string and generate multiple text nodes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derby actually does this splitting itself so that each token has an associated text node.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting I should remove this line because it's not relevant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aconrad Once this comment is resolved, we can get this merged!

@ovvn
Copy link
Contributor

ovvn commented Jul 1, 2017

good idea


Here are a few common possibilities:
* invalid HTML (as illustrated above)
* sorting lists on in `init()` might cause the output to be non-deterministic (like alphabetizing / capitalization). Basically a data "bug" would end-up generated different HTML.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might rephrase -
Using non-deterministic sorting for lists in `init()`. If the sort is non-deterministic the rendered list HTML can be different when it is rendered on the server and the client. This includes alphabetical sorts because they are implemented differently in Node and the browser.

@craigbeck craigbeck merged commit 8da2fb8 into derbyjs:master May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants