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

Snapshot generation fails due to <meta charset> outside the first 1024 bytes #1417

Closed
anssiko opened this issue Oct 26, 2017 · 6 comments · Fixed by #1418
Closed

Snapshot generation fails due to <meta charset> outside the first 1024 bytes #1417

anssiko opened this issue Oct 26, 2017 · 6 comments · Fixed by #1418

Comments

@anssiko
Copy link
Member

anssiko commented Oct 26, 2017

HTML snapshots generated from ReSpec source that contains <meta charset> as its first element in <head> fail validation with the following error:

A “charset” attribute on a “meta” element found after the first 1024 bytes.

Example ReSpec source:
https://github.com/w3c/manifest/blob/gh-pages/index.html#L4

This means that e.g. automatic WD publications with Echidna fail too.

I think one solution is to inject the chunk of CSS that pushes <meta charset> outside the first 1024 bytes as the last thing in <head>.

This is a pretty recent regression, since on the 22nd the Manifest publication succeeded: https://lists.w3.org/Archives/Public/public-tr-notifications/2017Sep/0095.html

Alternatively, this is could be a validator bug or feature, since another error was also introduced at the same time without related changes to the source:

Element “ol” not allowed as child of element “ol” in this context. (Suppressing further errors from this subtree.)

Full error log: https://lists.w3.org/Archives/Public/public-tr-notifications/2017Oct/0046.html

@anssiko
Copy link
Member Author

anssiko commented Oct 26, 2017

The latter error was fixable in source, PR submitted for that: w3c/manifest#625

For former error remains a blocker for Echidna-based WD publication.

@marcoscaceres
Copy link
Member

having a look now.

@anssiko
Copy link
Member Author

anssiko commented Oct 26, 2017

Thanks, that was fast! I can confirm this fix works as expected and the generated snapshot is now valid. Using the latest ReSpec version 18.2.1 released 9 minutes ago.

@anssiko
Copy link
Member Author

anssiko commented Oct 26, 2017

Probably not related, but reporting here to retain context:

Something wonky going on with Echidna. Merged w3c/manifest#625 after release 18.2.1 was deployed, but no notification was sent to https://lists.w3.org/Archives/Public/public-tr-notifications/2017Oct/ nor was https://www.w3.org/TR/appmanifest/ updated.

(The lone notification https://lists.w3.org/Archives/Public/public-tr-notifications/2017Oct/0046.html is for the earlier merge w3c/manifest#624).

Btw. we're at 666 commits to w3c/manifest now, perhaps that's the reason ¯\_(ツ)_/¯

Should I open an issue in https://github.com/w3c/echidna, or should I ask someone to reboot the server or some such magic?

@anssiko
Copy link
Member Author

anssiko commented Oct 26, 2017

You can ignore the previous comment, magic happened: https://lists.w3.org/Archives/Public/public-tr-notifications/2017Oct/0047.html

@marcoscaceres
Copy link
Member

Great to hear it’s working.

marcoscaceres added a commit to Geonovum/respec that referenced this issue Nov 23, 2017
v18.3.0

* tag 'v18.3.0': (66 commits)
  v18.3.0
  feat(core/list-sorter): teach ReSpec to sort OL + UL
  feat: teach ReSpec to sort definition lists
  chore(.travis): adhere to Node LTS
  v18.2.4
  fix(tools/respecDocWriter): colors.info is not a function
  v18.2.3
  chore(tools/release): only die on error
  chore(tools/release): always verify build
  v18.2.2
  fix: package.json & .snyk to reduce vulnerabilities
  v18.2.1
  fix(ui/save-html): move meta charset to top * closes w3c#1417
  docs(examples): use better basic example
  tests(tests/headless): add additional specs * closes w3c#612
  docs(examples): remove old examples
  tests(tests/headless): test against real specs
  chore(package): s/prepublish/prepare, per npm5
  v18.2.0
  feat(respecDocWriter): improve error reporting
  ...
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 a pull request may close this issue.

2 participants