{"html_url": "https://github.com/simonw/datasette/issues/1091#issuecomment-726415991", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1091", "id": 726415991, "node_id": "MDEyOklzc3VlQ29tbWVudDcyNjQxNTk5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-11-12T23:59:34Z", "updated_at": "2020-11-12T23:59:34Z", "author_association": "OWNER", "body": "The sort headers are generated by this template code: https://github.com/simonw/datasette/blob/5eb8e9bf250b26e30b017d39a392c33973997656/datasette/templates/_table.html#L11-L15\r\n\r\nThe export links use this code:\r\n\r\nhttps://github.com/simonw/datasette/blob/5eb8e9bf250b26e30b017d39a392c33973997656/datasette/templates/table.html#L134\r\n\r\nhttps://github.com/simonw/datasette/blob/5eb8e9bf250b26e30b017d39a392c33973997656/datasette/templates/table.html#L180-L201", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 742011049, "label": ".json and .csv exports fail to apply base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1091#issuecomment-726415019", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1091", "id": 726415019, "node_id": "MDEyOklzc3VlQ29tbWVudDcyNjQxNTAxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-11-12T23:56:23Z", "updated_at": "2020-11-12T23:56:23Z", "author_association": "OWNER", "body": "@tballison is there any chance you're running any custom templates in that installation? I'm really confused as to why I can't replicate the bug.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 742011049, "label": ".json and .csv exports fail to apply base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1091#issuecomment-726413829", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1091", "id": 726413829, "node_id": "MDEyOklzc3VlQ29tbWVudDcyNjQxMzgyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-11-12T23:52:50Z", "updated_at": "2020-11-12T23:54:16Z", "author_association": "OWNER", "body": "Hmm... it's not just the `.csv` and `.json` export links - it's the column headings (which can be clicked to change the sort order) as well. Here's an extract of the HTML from that page:\r\n```html\r\n

This data as \r\n json, \r\n CSV (\r\n advanced)\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n Link\r\n \r\n rowid \u25bc\r\n \r\n PARSE_EXCEPTION_ID\r\n \r\n PARSE_EXCEPTION_DESCRIPTION\r\n
10RUNTIME
21ENCRYPTION
32ACCESS_PERMISSION
43UNSUPPORTED_VERSION
\r\n
\r\n
\r\n

Advanced export

\r\n

JSON shape:\r\n default,\r\n array,\r\n newline-delimited\r\n

\r\n
\r\n

\r\n CSV options: \r\n \r\n \r\n \r\n

\r\n
\r\n
\r\n```\r\nBut here's something _really_ weird - the links to the individual rows DO include the `/datasette/` prefix:\r\n```html\r\n\r\n 2\r\n\r\n```\r\nThe navigation bar on that page is correct too:\r\n```html\r\n

\r\n home /\r\n corpora-metadata\r\n

\r\n```\r\nI've also been unable to replicate this in my own local environment, running `datasette fixtures.db --config base_url:/datasette/`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 742011049, "label": ".json and .csv exports fail to apply base_url"}, "performed_via_github_app": null}