Skip to content

[BUG / V2] Combat Sequence (srd-2014 Rule) contains errors, bugs out beta site #892

@calumbell

Description

@calumbell

Bug description

The API data for the srd-2014 Combat Sequence (srd_combat-sequence) RuleSet is causing issues on the front-end. There are two bugs; one can be seen on the beta site, and the other during local tests.

The first is that srd-2014 Combat Sequence page on the beta site is straight up bugged. Nothing loads.

Image

Looking over the Vue production error code reference, the code 24 is raised by an unclosed tag.

The second issue is that the Combat Step by Step blockquote is busted. Likely a bug in the markdown for this section:

Image

The first bug doesn't choke the site running on local, but the console is screaming out loads of warnings that might help diagnose the first bug:

[Vue warn]: Template compilation error: Element is missing end tag.
1  |  <div><p>Certain special abilities, spells, and situations allow you to take a special action called a reaction. A reaction is an instant response to a trigger of some kind, which can occur on your turn or on someone else's. The opportunity attack <srd:opportunity-attacks> is the most common type of reaction.</p>
   |                                                                                                                                                                                                                                                         ^
2  |  <p>When you take a reaction, you can't take another one until the start of your next turn. If the reaction interrupts another creature's turn, that creature can continue its turn right after the reaction.</p></div> 
  at <Anonymous class="markdown" > 
  at <VueShowdown ref="mdwrapper" vue-template=true options= 
Object { tables: true, headerLevelStart: 1, vueTemplate: true, simpleLineBreaks: true }
 
 ... > 
  at <MdViewer text="Certain special abilities, spells, and situations allow you to take a special action called a ...

It looks like the inclusion of "<srd:opportunity-attacks>" in the markdown string is causing the bug. HTML parsers are usually okay with custom HTML elements (they will default them to a <div>), but I think that the issue hear might be that this tag doesn't have paired closing tag.

As to why "<srd:opportunity-attacks>" is in this Markdown string, if I had to guess it would be an early attempt to implement or test cross-references between documents.

Steps to Reproduce

  1. For the first error, visit the srd-2014 Combat Sequence page on the beta site with the console open. Not that the page doesn't load.
  2. View the logs and you'll see the following error: SyntaxError: https://vuejs.org/error-reference/#compiler-24.
  3. To see the other bug, spin up a Nuxt development server fork of the front-end repo and then visit the same page. Observe that the blockquote is malformed

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions