Skip to content

History tool default URL points to a 404 path #501

@thehabes

Description

@thehabes

Summary

The default history tool registration in classes/Tools/Tools.js:221 points to https://app.t-pen.org/components/line-history/index.js, which returns 404 Not Found. There is no components/line-history/ directory in tpen3-interfaces. The component is actually published on GitHub Pages from the tpen-line-history repo.

As a result, every project created with the default tool set inherits a broken history tool URL. In the splitscreen interface (components/simple-transcription/index.js) the script branch tries to load the URL and fails with net::ERR_ABORTED 404, so the <tpen-line-history> element never gets defined and the pane stays blank.

Reproduction

  1. Open any project with the default tool set in the simple-transcription splitscreen.
  2. Activate the History tool.
  3. DevTools console shows: GET https://app.t-pen.org/components/line-history/index.js net::ERR_ABORTED 404 (Not Found).

Suggested fix

In classes/Tools/Tools.js, change line 221:

-            "url": "https://app.t-pen.org/components/line-history/index.js",
+            "url": "https://centerfordigitalhumanities.github.io/tpen-line-history/tpen-line-history.js",

(The filename is tpen-line-history.js, matching the repo's package.json#main — not index.js.)

Migration note for existing projects

Existing project documents in MongoDB carry the bad URL embedded in their tools array. After the source fix lands, a one-time update is needed:

db.projects.updateMany(
  { "tools.toolName": "history" },
  { $set: { "tools.$[t].url": "https://centerfordigitalhumanities.github.io/tpen-line-history/tpen-line-history.js" } },
  { arrayFilters: [ { "t.toolName": "history", "t.url": "https://app.t-pen.org/components/line-history/index.js" } ] }
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions