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

mj-include doesn't handle the paths correctly #970

Closed
ngarnier opened this issue Jan 26, 2018 · 3 comments
Closed

mj-include doesn't handle the paths correctly #970

ngarnier opened this issue Jan 26, 2018 · 3 comments
Labels
Milestone

Comments

@ngarnier
Copy link
Member

ngarnier commented Jan 26, 2018

There is an issue with how mj-include paths and navigation, breaking the rendering of the rest of the file.

File: index.mjml
TypeError: Cannot read property 'includedIn' of null
Input file(s) failed to render

Stacktrace

TypeError: Cannot read property 'includedIn' of null
TypeError: Cannot read property 'includedIn' of null
    at handleInclude (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/mjml-parser-xml/lib/index.js:130:33)
    at Object.onopentag (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/mjml-parser-xml/lib/index.js:208:16)
    at Parser.onopentagend (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Parser.js:172:37)
    at Parser._closeCurrentTag (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Parser.js:219:7)
    at Parser.onselfclosingtag (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Parser.js:210:8)
    at Tokenizer._stateInSelfClosingTag (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Tokenizer.js:243:13)
    at Tokenizer._parse (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Tokenizer.js:651:9)
    at Tokenizer.write (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Tokenizer.js:632:7)
    at Parser.write (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/htmlparser2/lib/Parser.js:334:18)
    at MJMLParser (/Users/nicolas/Documents/code/mjml4-beta/v1/node_modules/mjml-parser-xml/lib/index.js:272:10)
Input file(s) failed to render
@ngarnier ngarnier added this to the 4.0.0 milestone Jan 26, 2018
@ngarnier ngarnier changed the title Rendering a template with several mj-include returns an error with v4.0.0-beta.1 mj-include doesn't handle the paths correctly Jan 30, 2018
@jipiboily
Copy link

Any rough ETA for that and the beta 2 release?

@jipiboily
Copy link

FYI, if someone is using mjml-rails with v4, you can use native Rails render.

@ngarnier
Copy link
Member Author

ngarnier commented Feb 5, 2018

Hey @jipiboily, as you can say we closed the issue because it's fixed on next. We plan to release a new beta version tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants