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

Error: Cannot read property 'for_' of undefined #689

Closed
riannella opened this issue Apr 12, 2016 · 7 comments
Closed

Error: Cannot read property 'for_' of undefined #689

riannella opened this issue Apr 12, 2016 · 7 comments

Comments

@riannella
Copy link

I get the following error:

[TypeError] Cannot read property 'for_' of undefined ⊟
TypeError: Cannot read property 'for_' of undefined
at HTMLAnchorElement. (https://www.w3.org/Tools/respec/respec-w3c-common:18:6493)
at Function.ae.extend.each (https://www.w3.org/Tools/respec/respec-w3c-common:8:482)
at ae.fn.ae.each (https://www.w3.org/Tools/respec/respec-w3c-common:7:30459)
at Object.run (https://www.w3.org/Tools/respec/respec-w3c-common:18:5875)
at https://www.w3.org/Tools/respec/respec-w3c-common:10:17586

at https://www.w3.org/Tools/respec/respec-w3c-common:10:17548

@marcoscaceres
Copy link
Member

Do you have a link to your spec itself? Unfortunately, the error below comes from the minified code so it's not possible for me to debug.

On 13 Apr 2016, at 9:49 AM, riannella notifications@github.com wrote:

I get the following error:

[TypeError] Cannot read property 'for_' of undefined ⊟
TypeError: Cannot read property 'for_' of undefined
at HTMLAnchorElement. (https://www.w3.org/Tools/respec/respec-w3c-common:18:6493)
at Function.ae.extend.each (https://www.w3.org/Tools/respec/respec-w3c-common:8:482)
at ae.fn.ae.each (https://www.w3.org/Tools/respec/respec-w3c-common:7:30459)
at Object.run (https://www.w3.org/Tools/respec/respec-w3c-common:18:5875)
at https://www.w3.org/Tools/respec/respec-w3c-common:10:17586

at https://www.w3.org/Tools/respec/respec-w3c-common:10:17548


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@riannella
Copy link
Author

@marcoscaceres
Copy link
Member

@riannella thanks! (and hi! long time 😄!)

Confirmed error...

TypeError: undefined is not an object (evaluating 'linkTargets[0].for_')  link-to-dfn.js:75

Trying to find what is causing it in the doc itself.

@marcoscaceres
Copy link
Member

@riannella, you have some markup in your document that is causing the issue:

<h4><a name="section-231"></a>2.3.1 Role</h4> 

That should be:

<section>
<h4>Role</h4>
 ...
</section>

That will allow ReSpec to auto id that section and number it for you.

ReSpec should warn about <a name></a> being a deprecated way of linking in a document as part of #20 .

@marcoscaceres
Copy link
Member

@riannella, there is also one more. Search for:

<h3><a name="section-22"></a>2.2 Asset</h3>

@marcoscaceres
Copy link
Member

@riannella, I would also recommend running HTML5 Tidy over your document. It will take care of the nesting for you wrt to <section>s, making it easier to spot issues. Plus it's also good for when people send you PRs on github. Keeps code clean, etc.

@riannella
Copy link
Author

On 13 Apr 2016, at 13:36, Marcos Caceres notifications@github.com wrote:

@riannella https://github.com/riannella, I would also recommend running HTML5 Tidy https://github.com/htacg/tidy-html5 over your document. It will take care of the nesting for you wrt to

s, making it easier to spot issues. Plus it's also good for when people send you PRs on github. Keeps code clean, etc.

Thanks Marcos !!

Renato

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

2 participants