MDN/Archives/Development/CompatibilityTables/Importer: Difference between revisions

Jump to navigation Jump to search
→‎The Issues: Remove legacy issues without notes, add issue currently in importer
(Fix bulleted list, KumaScript macro references)
(→‎The Issues: Remove legacy issues without notes, add issue currently in importer)
Line 111: Line 111:
== The Issues ==
== The Issues ==
The importer identifies classes of issues with a ''slug'', a short span of text.  The sections below use those slugs as the title, so that we can link directly from the importer to advice for handling that class of issue.
The importer identifies classes of issues with a ''slug'', a short span of text.  The sections below use those slugs as the title, so that we can link directly from the importer to advice for handling that class of issue.
=== bad_json ===
''Error template'':<br />
Response from {url} is not JSON<br />
Actual content:
{content}
''No one has contributed hints for handling this issue yet.''


=== compatgeckodesktop_unknown ===
=== compatgeckodesktop_unknown ===
Line 132: Line 123:
* The version of Gecko needs to exist! To check that it exists if you are not sure, check for it on the [https://developer.mozilla.org/en-US/Firefox/Releases Firefox Developer Release Notes] page.
* The version of Gecko needs to exist! To check that it exists if you are not sure, check for it on the [https://developer.mozilla.org/en-US/Firefox/Releases Firefox Developer Release Notes] page.
* If you want to state Firefox 3.5, the version number you need to enter is actually 1.9.1. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector Element.querySelector].
* If you want to state Firefox 3.5, the version number you need to enter is actually 1.9.1. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector Element.querySelector].
=== compatgeckofxos_override ===
''Error template'':<br />
Override &quot;{override}&quot; is invalid for Gecko version &quot;{version}&quot;.<br />
The importer does not recognize this override for CompatGeckoFxOS. Change the MDN page or update the importer.
''No one has contributed hints for handling this issue yet.''
=== compatgeckofxos_unknown ===
''Error template'':<br />
Unknown Gecko version &quot;{version}&quot;<br />
The importer does not recognize this version for CompatGeckoFxOS. Change the MDN page or update the importer.
''No one has contributed hints for handling this issue yet.''


=== exception ===
=== exception ===
Line 154: Line 129:
{traceback}
{traceback}


''No one has contributed hints for handling this issue yet.''
* Retry the scrape at a later time. If it continues, file a bug in Bugzilla.
 
 
=== extra_cell ===
''Error template'':<br />
Extra cell in compatibility table row.<br />
A row in the compatibility table has more cells than the header row. It may be the cell identified in the context, a different cell in the row, or a missing header cell.
 
''No one has contributed hints for handling this issue yet.''
 


=== failed_download ===
=== failed_download ===
Line 171: Line 137:
{text}
{text}


''No one has contributed hints for handling this issue yet.''
* Retry the scrape at a later time. If it continues, file a bug in Bugzilla.
 
 
=== false_start ===
''Error template'':<br />
No &lt;h2&gt; found in page.<br />
A compatibility table must be after a proper &lt;h2&gt; to be imported.
 
''No one has contributed hints for handling this issue yet.''
 


=== footnote_feature ===
=== footnote_feature ===
Line 187: Line 144:
The Feature model does not include a notes field. Remove the footnote from the feature.
The Feature model does not include a notes field. Remove the footnote from the feature.


''No one has contributed hints for handling this issue yet.''
* On the MDN page, remove the footnote reference from the feature and remove the footnote.




Line 195: Line 152:
The compatibility table has a reference to footnote &quot;{footnote_id}&quot;, but no matching footnote was found. This may be due to parse issues in the footnotes section, a typo in the MDN page, or a footnote that was removed without removing the footnote reference from the table.
The compatibility table has a reference to footnote &quot;{footnote_id}&quot;, but no matching footnote was found. This may be due to parse issues in the footnotes section, a typo in the MDN page, or a footnote that was removed without removing the footnote reference from the table.


''No one has contributed hints for handling this issue yet.''
* On the MDN page, fix the footnote or remove the footnote reference.




Line 236: Line 193:
Footnote references, such as [1], are used to link the footnote to the support assertion in the compatibility table. Reformat the MDN page to use footnote references.
Footnote references, such as [1], are used to link the footnote to the support assertion in the compatibility table. Reformat the MDN page to use footnote references.


''No one has contributed hints for handling this issue yet.''
* If the text is a footnote, add a footnote reference
* If the text is not a footnote, move it or remove it
* If the text is not Compatibility Data, you may need to add a section header, like <code>&lt;h3&gt;See Also&lt;/h3&gt;</code>




Line 247: Line 206:


* Take care of any footnote_multiple issues, which usually result in a footnote_unused warning as well.
* Take care of any footnote_multiple issues, which usually result in a footnote_unused warning as well.
=== halt_import ===
''Error template'':<br />
Unable to finish importing MDN page.<br />
The importer was unable to finish parsing the MDN page. This may be due to a duplicated section, or other unexpected content.
''Possible solutions'':<br />
* This is often caused by additional content within the sections, e.g. a &lt;div class="note"&gt; below the browser compatibility table. If the note is for specific browsers, change it to use the standard format &lt;p&gt;[1] ...&lt;/p&gt;. If it's a general note, it may be moved to the general description at the top of the page.
* It may also happen that the &lt;div&gt;s wrapping the compatibility tables are not closed directly after the table but extend over the rest of the page. In those cases move the closing &lt;/div&gt; to the right position.


=== inline_text ===
=== inline_text ===
Line 284: Line 233:
</pre>
</pre>


=== nested_p ===
=== kumascript_wrong_args ===
''Error template'':<br />
''Error template'':<br />
Nested &lt;p&gt; tags are not supported.<br />
Bad argument count in KumaScript {kumascript} in compatibility feature.<br/>
Edit the MDN page to remove the nested &lt;p&gt; tag
The importer expected {name} to have {expected arguments}, but it had {actual arguments}
 
* Change the MDN page so that the KumaScript has the expected number of arguments
* If the argument count is correct, file a bug to fix the importer.


''No one has contributed hints for handling this issue yet.''
=== missing_attribute ===
''Error template'':<br />
The tag {tag} is missing the expected attribute {attribute}<br />
Add the missing attribute or convert the tag to plain text.


* The importer does not handle <code>&lt;a&gt;</code> tags used as link targets, such as <code>&lt;a name="compat_hint1"&gt;</code>.  Remove the <code>&lt;a&gt;</code> tag from the footnote and the compatibility table, leaving plain footnote references like "[1]".
=== no_data ===
''Error template'':<br />
No data was extracted from the page. <br />
The page appears to have data, but nothing was extracted. Check for header sections wrapped in a &lt;div&gt; or other element. (Context will probably not highlight the issue)
* On the MDN page, look for a <code>&lt;div&gt;</code> or other element that wraps sections and remove it.
* If the page doesn't actually have specification or compatibility data, file a bug.


=== section_missed ===
=== section_missed ===
Line 297: Line 261:
The import of section {title} failed, but no parse error was detected. This is usually because of a previous critical error, which must be cleared before any parsing can be attempted.
The import of section {title} failed, but no parse error was detected. This is usually because of a previous critical error, which must be cleared before any parsing can be attempted.


''No one has contributed hints for handling this issue yet.''
* Fix other errors.  If this remains and you can not determine the cause, file a bug.
 


=== section_skipped ===
=== section_skipped ===
Line 318: Line 281:


* The "Browser compatibility table" should be structured just like the one on the [https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API Fetch API landing page]. If some diffrent kind of table is being used, replace it with a table of this structure.
* The "Browser compatibility table" should be structured just like the one on the [https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API Fetch API landing page]. If some diffrent kind of table is being used, replace it with a table of this structure.
=== skipped_content ===
''Error template'':<br />
Content will not be imported.<br />
This content will not be imported into the API.
* If the content in its current format is important to the presentation, ignore this warning.
* If the content could be expressed as one or more support footnotes, convert it to footnotes
* If the content could exist outside of a specification or compatibility section, move it
* If the content is explaining why there is no specification information, it can be wrapped in <code><nowiki>{{WhyNoSpecStart}}/{{WhyNoSpecEnd}}</nowiki></code> blocks.
=== skipped_h3 ===
''Error template'':<br />
&lt;h3&gt;{name}&lt;/h3&gt; was not imported. <br/>
&lt;h3&gt; subsections are usually prose compatibility information, and anything after an &lt;h3&gt; is not parsed or imported. Convert to footnotes or move to a different &lt;h2&gt; section.
* If the data can be expressed as footnotes, change to footnotes to import it.
* If the data can not be expressed as footnotes, move it to a different section.
=== spec2_converted ===
''Error template'':<br />
Specification status should be converted to KumaScript<br/>
Expected KumaScript <nowiki>{{Spec2("")}}</nowiki>, but got text "{name}".
* Convert the MDN page to use <nowiki>{{Spec2()}}</nowiki>


=== spec_h2_id ===
=== spec_h2_id ===
''Error template'':<br />
''Error template'':<br />
Expected &lt;h2 id=&quot;Specifications&quot;&gt;, actual id={{h2_id}}<br />
Expected &lt;h2 id=&quot;Specifications&quot;&gt;, actual id=<nowiki>{{h2_id}}</nowiki><br />
Fix the id so that the table of contents, other feature work.
Fix the id so that the table of contents, other feature work.


''No one has contributed hints for handling this issue yet.''
* Fix the ID on the MDN page
 


=== spec_h2_name ===
=== spec_h2_name ===
''Error template'':<br />
''Error template'':<br />
Expected &lt;h2 name=&quot;Specifications&quot;&gt;, actual name={{h2_name}}<br />
Expected &lt;h2 name=&quot;Specifications&quot;&gt;, actual name=<nowiki>{{h2_name}}</nowiki><br />
Fix or remove the name attribute.
Fix or remove the name attribute.


''No one has contributed hints for handling this issue yet.''
* Fix the name on the MDN page




Line 340: Line 328:
SpecName and Spec2 must refer to the same mdn_key. Update the MDN page.
SpecName and Spec2 must refer to the same mdn_key. Update the MDN page.


''No one has contributed hints for handling this issue yet.''
* Update the MDN page to make the two macros agree.
 
=== specname_not_kumascript ===
''Error template'':<br />
Specification name unknown, and should be converted to KumaScript
Expected KumaScript <nowiki>{{SpecName(key, subpath, name)}}</nowiki>, but got text "{name}".
 
* Update the MDN page to use <nowiki>{{SpecName(key, subpath, name)}}</nowiki>


=== tag_dropped ===
=== tag_dropped ===
Line 353: Line 348:
''Possible solutions'':<br />
''Possible solutions'':<br />
* This is caused by an attribute within an HTML tag, which is not expected to have that attribute, e.g. when a <code>&lt;p&gt;</code> tag has an <code>id</code> attribute or there is an unnecessary <code>style</code> attribute. In those cases you may just remove the attribute from the tag. If you feel, the attribute is valid at that place, file a new bug against the importer and mark it as blocker for [https://bugzilla.mozilla.org/show_bug.cgi?id=1132269 bug 1132269].
* This is caused by an attribute within an HTML tag, which is not expected to have that attribute, e.g. when a <code>&lt;p&gt;</code> tag has an <code>id</code> attribute or there is an unnecessary <code>style</code> attribute. In those cases you may just remove the attribute from the tag. If you feel, the attribute is valid at that place, file a new bug against the importer and mark it as blocker for [https://bugzilla.mozilla.org/show_bug.cgi?id=1132269 bug 1132269].
=== unexpected_kumascript ===
''Error template'':<br />
KumaScript {kumascript} was not expected in {section}.
The KumaScript {kumascript} appears in a {section}, but is only expected in {expected_sections}. File a bug, or convert the MDN page to not use this KumaScript macro here.
* If the error occurs in a compatibility support, the solution is often required to convert the text into a footnote.
* If a <nowiki>{{Compat*}}</nowiki> macro is used in a footnote, this is often because multiple versions are being described in a footnote.  Instead, convert the support to cover multiple versions (see the notes for multiple footnotes)


=== unknown_browser ===
=== unknown_browser ===
Line 359: Line 362:
The API does not have a browser with the name &quot;{name}&quot;. This could be a typo on the MDN page, or the browser needs to be added to the API.
The API does not have a browser with the name &quot;{name}&quot;. This could be a typo on the MDN page, or the browser needs to be added to the API.


''No one has contributed hints for handling this issue yet.''
* At this stage, it is mostly due to typos on the MDN page.  On the MDN page, change the browser name to one used on other pages on MDN.
 


=== unknown_kumascript ===
=== unknown_kumascript ===
Line 377: Line 379:
The API does not have a specification with mdn_key &quot;{key}&quot;. This could be a typo on the MDN page, or the specfication needs to be added to the API.
The API does not have a specification with mdn_key &quot;{key}&quot;. This could be a typo on the MDN page, or the specfication needs to be added to the API.


''No one has contributed hints for handling this issue yet.''
* Look at [https://developer.mozilla.org/en-US/docs/Template%3ASpecName the SpecName template] for a close misspelling. Change the MDN page to match SpecName
 
* If the entry appears in SpecName, then try a Reset to re-import the page.  If that doesn't work, then SpecName changed recently and the API needs to be refreshed.


=== unknown_version ===
=== unknown_version ===
Line 385: Line 387:
The API does not have a version &quot;{version}&quot; for browser &quot;{browser_name} (id {browser_id}, slug &quot;{browser_slug}&quot;). This could be a typo on the MDN page, or the version needs to be added to the API.
The API does not have a version &quot;{version}&quot; for browser &quot;{browser_name} (id {browser_id}, slug &quot;{browser_slug}&quot;). This could be a typo on the MDN page, or the version needs to be added to the API.


''No one has contributed hints for handling this issue yet.''
* Try a Reset - the version might have been added since the page was last imported.
* If not, as the #mdn IRC channel if it is a valid version.
67

edits

Navigation menu