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

"Don't misbehave" error never shows up in Starcounter apps #60

Open
warpech opened this issue Feb 14, 2019 · 0 comments
Open

"Don't misbehave" error never shows up in Starcounter apps #60

warpech opened this issue Feb 14, 2019 · 0 comments

Comments

@warpech
Copy link
Contributor

warpech commented Feb 14, 2019

"Don't misbehave" error never shows up in Starcounter apps, because it shows up only when there are 0 templates in the imported document.

However, in case of a Starcounter app, each app creates its own HTML view that should have a <template>, so we need to count the number of templates in every IMPORTED-TEMPLATE-SCOPE.

Secondly, Starcounter's own htmlmerger inserts two <templates> by its own (see lines 344 and 367): https://github.com/Starcounter/level1/blob/0f8258d36f95558596c5744b54e300bc72568bd7/src/Starcounter.Apps.JsonPatch/SystemHandlers.cs#L344-L367

For of these two reasons, a wrong response that comes from the server for a request http://localhost:8080/sc/htmlmerger?Products_0=%2FProducts%2FStarcounter.Authorization.Unauthorized.html:

<template><template is="declarative-shadow-dom"><style>:host{display:block}</style></template></template>
<imported-template-scope scope="Products_0">404 Page Not Found</imported-template-scope>
<template><template is="declarative-shadow-dom"><slot></slot></template></template>

is not seen as wrong by imported-template.

In result, the developer can see an empty screen and does not know what happened:

image

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

No branches or pull requests

1 participant