Opening MD files problem

There is problem when trying to open a .md files.
this is a different problem that described in 7.
release notes and doesn’t relate to filecomment table.

seafile trying to open *.md files using internal API (as mentioned in logs) and the following error triggered in browser:

bundle.common.ccc9d0ce6ba1.js:1 Mixed Content: The page at ‘https://data..com/lib/b6fbea5e-cc27-4550-839a-71f6ab143c76/file/zzzzz/zzzzz/PDA.md’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://data..com:8082/files/1b27661b-efce-497d-ae30-a99006012d4c/PDA.md’. This request has been blocked; the content must be served over HTTPS.

the reason is obvious, page that was loaded via HTTPS trying to get content via HTTP.

i can “permit” to my browser to unblock such request and then I DO can see the file.

any ideas how i can fix it for all?

Please check your SERVICE_URL and FILE_SERVER_ROOT setting.

This is the first step i made, everything looks as it should be (https).

Do you think i should check DB with “hardcoded” links to files? as i’ve upgraded my serevr from http to https an year ago and it may some leftovers…

Did you check the value in the admin Web UI?

The URLs are not saved in database.

Yes for your first question, i did it a few years ago and also triple checked now.

can you advise?

this happened just for *.md files, the rest is perfect! but i have a lot of *.md in work cycle ;(

I have the same issue. I cannot open .md files in the seafile web interface. I can download the files and open them locally without any problems.

If after upgrading to 7.0, you are not able to open Markdown file and if your seahub.log containing some database error, it is caused by you forgot to migrate file comment when you upgrade to 6.3 version.

You can delete the table base_filecomment and recreate the table.

CREATE TABLE `base_filecomment` (

    `id` int(11) NOT NULL AUTO_INCREMENT,
  `author` varchar(255) NOT NULL,

    `comment` longtext NOT NULL,
  `created_at` datetime NOT NULL,

    `updated_at` datetime NOT NULL,
  `uuid_id` char(32) NOT NULL,

    `detail` longtext NOT NULL,
  `resolved` tinyint(1) NOT NULL,

    PRIMARY KEY (`id`),
  KEY `base_filecomment_uuid_id_4f9a2ca2_fk_tags_fileuuidmap_uuid` (`uuid_id`),

    KEY `base_filecomment_author_8a4d7e91` (`author`),

    KEY `base_filecomment_resolved_e0717eca` (`resolved`),

    CONSTRAINT `base_filecomment_uuid_id_4f9a2ca2_fk_tags_fileuuidmap_uuid` FOREIGN KEY (`uuid_id`) REFERENCES `tags_fileuuidmap` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

If you are using SQLite, the statement is

CREATE TABLE "base_filecomment" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
 "author" varchar(255) NOT NULL,
 "comment" text NOT NULL, 
"created_at" datetime NOT NULL, 
"updated_at" datetime NOT NULL, 
"uuid_id" char(32) NOT NULL REFERENCES "tags_fileuuidmap" ("uuid"), 
"detail" text NOT NULL, 
"resolved" bool NOT NULL);

I run everything in docker. Does this still apply?

I think I have the scenario as described by @daniel.pan and would like use your proposed solution.
Unfortunately I’m not a DBadmin at all so I have some questions and look for more detailed advice.
My CE edition running on a raspberry pi and the DB used is a mysql.

I need to run the DB commands as db-user seafile or as db-user root?

To delete the table base_filecomment I just run

DROP TABLE base_filecomment;

?
And to recreate it I copy&paste what daniel.pan proposed his post above

CREATE TABLE `base_filecomment` (

    `id` int(11) NOT NULL AUTO_INCREMENT,
  `author` varchar(255) NOT NULL,

    `comment` longtext NOT NULL,
  `created_at` datetime NOT NULL,

    `updated_at` datetime NOT NULL,
  `uuid_id` char(32) NOT NULL,

    `detail` longtext NOT NULL,
  `resolved` tinyint(1) NOT NULL,

    PRIMARY KEY (`id`),
  KEY `base_filecomment_uuid_id_4f9a2ca2_fk_tags_fileuuidmap_uuid` (`uuid_id`),

    KEY `base_filecomment_author_8a4d7e91` (`author`),

    KEY `base_filecomment_resolved_e0717eca` (`resolved`),

    CONSTRAINT `base_filecomment_uuid_id_4f9a2ca2_fk_tags_fileuuidmap_uuid` FOREIGN KEY (`uuid_id`) REFERENCES `tags_fileuuidmap` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

just straight to the sql-command line?

Thanks for any advice!

!!!UPDATE: SOLVED!!!
See my post here Problems after upgrade to 7.0.4 CE - #15 by Golf