Open PengjuYan opened 5 years ago
Hi, could you specify the version of TWC you are using? I've tested the latest version of Timimi (modified in dev mode) with 2.9.2 and the message box is removed there, so it's essential to get a way to reproduce the issue to fix it
I tested by using a freshly downloaded (just downloaded before I did the test) 2.9.2 version. And my FireFox version is 68.0.1 on macOS.
(Just a reminder: As I mentioned in #23, it's possible that "FireFox + approved add-on" and "web-ext FireFox + you local add-on" may behave differently.)
Ok, thanks for reporting. Unfortunatelly I probably won't be able to test and start debugging this until Monday; could you test whether the "contamination" is cumulative or not? (open TW, edit, save, reload TW, edit and save again: are those bits added only once or some are added twice?)
Not cumulative. Just added only once.
@YakovL : May I assign this issue to you?
@ibnishak yeap, no problem
Hi @PengjuYan , could you check whether your FireFox has (in about:config
) security.fileuri.strict_origin_policy
disabled? I suspect that disabling it will stop contaminating (although won't undo it so you probably need to do that manually)
Hi @YakovL , I tested by switching security.fileuri.strict_origin_policy
from default true
to false
back and forth, and found that the "contaminating" disappears!
In concrete:
<title>
element is filled in with "My TiddlyWiki - a reusable ...". This is benign.patch-classic-io.js
appears in <head>
.tiddlyfox-message-box
<div>
appears at the end of <body>
.In other words, the value of security.fileuri.strict_origin_policy
doesn't effect the phenomenon. The problem has been fixed automatically (possibly by FireFox 68.0.2 ?).
My settings include:
Shall I close this issue?
@pmario Thank you Mario for pointing me to the discussion there. According to @pmario and @YakovL, seems like the problem lies in recreateOriginal
and @pmario solved it in his amazing file-backups (back in 2017 when I was using file-backups I suffered the same problem and I switched to savetiddlers 0.6).
Is there any plan to fix this issue in Timimi for TWC?
I just reproduced this issue by using TWC 2.9.2 + Firefox 75.0 + macOS Catalina (10.15.4) once again.
Will look into it for the next upgrade.
Couple of notes:
title
) this is actually the expected behavior, title
is calced in accord to SiteTitle and SiteSubtitle on saving, this is not a contamination. Well, may be this needs retesting ("My TiddlyWiki - a reusable ..." is in accord to initial SiteTitle and SiteSubtitle values, but it should always be from the current values when they are different from initial ones)patch-classic-io.js
script is expected to be removed from the head. If it is not, it should be investigated and fixed; in Chrome it will be removed slightly differentlytiddlyfox-message-box
is something that needs a closer look. First, it should probably be removed in recreateOriginal
by TWC core (see backward compatibility notes by Mario in the thread he referenced). Second, I'm not sure if browser extensions should do anything about it. Chrome is very restrictive about XHRs via file:// scheme. Actually, the best approach would be to support file loading functionality by Timimi (backend and extension), but this is not yet something where I can contributeHi @ibnishak and @YakovL , is there any plan to investigate the issue?
My TWC file keeps add patch-classic-io.js
to the <head>
section. I will have to open the .html
file and clean it manually time by time after many patch-classic-io.js
accumulated.
Reproduction environment:
Software | Version |
---|---|
TiddlyWiki Classic | 2.10.0 |
Firefox | 122.0.1 (64-bit) |
macOS | 13.0.1 |
Reproduction result:
<div>
id=tiddlyfox-message-box
appears at the end of <body>
.
1.2. A <script>
with src=patch-classic-io.js
appears at the end of <head>
.<script>
with src=patch-classic-io.js
appears at the end of <head>
.That is to say, the <script>
with src=patch-classic-io.js
will be accumulated in the TWC file whenever you save it after a reload.
Hi Pengju, well it wasn't planned before (or rather was somethere in the middle of my big backlog(s)), but may be I'll take a look for the next release. I've created a TW issue: https://github.com/TiddlyWiki/TiddlyWikiClassic/issues/308; but may be I'll propose a Timimi update as well
Hi @YakovL , thought you guys have a lot of things to do. Just to remind and hope you put it on the agenda. Never mind and take your time. :-)
Thank you @YakovL and @ibnishak for making Timimi and making it work for TiddlyWiki classic (#23).
Though, there're some problems in the resulting TWC file what the previous plugins (although they don't work any more) won't produce. In short, the original clean TWC file is "contaminated" somewhat. Although it doesn't block TWC or Timimi from working, it's still better if we keep the file content to be original.
If you compare the original clean TWC file and a updated file saved by Timimi, you will see 3 unwanted differences (other than the
<storeArea>
):<title>
element is filled in with "My TiddlyWiki - a reusable ...".patch-classic-io.js
appears in<head>
.tiddlyfox-message-box
<div>
appears at the end of<body>
.