[Fixed] Don’t make Bug Tracker’s online editor convert your links into relative paths.

Bug Tracker is our excellent homemade issue tracker software. However, its TinyMCE editor converts all your links which are made by your host into relative paths.

For example, if your host is http://example.com and you have established your bug tracker on it. Then, you want to add one link e.g. http://example.com/some_information.html to your report in bug tracker. By default, its TinyMCE editor converts your link to be ./some_information.html 

It seems to be okay. But here’s one problem: If you use its forwarding email service, it would forward the “converted urls” to the project manager and the project subscribers. Thus, they may confuse with your link which is represented by  http://./some_information.html not http://example.com/some_information.html !

The main cause of this strange phenomena is: “the default setting of its TinyMCE editor is relative_urls = true“. To avoid this terrible event, you should follow these steps:
1. Find the files listed below in your Bug Tracker directory:
    (1) ./tinymce/tiny_mce_src.js
    (2) ./tinymce/tiny_mce.js
    (3) ./feedback_site/tinymce/tiny_mce_src.js
    (4) ./feedback_site/tinymce/tiny_mce.js

2. For each file of the above, use your text editor to open it and find the keyword “relative_urls”. Then, set the attribute as below:
     _def(“relative_urls”, false);
3. Make sure you have edited the above four files. Then, enjoy it!
[Important] Be aware of the cache of your browser such as Chrome, Firefox. If you have modified the four .js files, but you also get the same results with relative urls. Try to cleanup the cache of your browser because it has cached your old javascript files for the speed reason.

[Chinese Translation]

Bug Tracker是我們傑出的國產Issue Tracker軟體。然而,它內建的TinyMCE編輯器,會轉換所有來自於你自家網站的連結成為相對路徑。
舉例來說,若你的自家網站為http://example.com,而且你已經在上面自行架設Bug Tracker。然後,你在上面想要發一個帶有連結網址為http://example.com/some_information.html的貼文。預設的情況下,TinyMCE會很貼心地將你的網址轉為./some_information.html
這看起來很OK。但這有一個問題:當你啟用它內建的轉信服務時,它將轉寄「已轉換過的URL」給你的專案管理人員與訂閱者。因此,他們會對你的貼文感到困惑,因為上面的網址會是http://./some_information.html 而非 http://example.com/some_information.html 。
會造成這個怪現象的主因是「它內建TinyMCE的預設設定值為 relative_urls = true」。為了避免此一現象,請照著以下步驟施行:
1. 找到你的Bug Tracker資料夾下的四個檔案:
    (1) ./tinymce/tiny_mce_src.js

    (2) ./tinymce/tiny_mce.js
    (3) ./feedback_site/tinymce/tiny_mce_src.js
    (4) ./feedback_site/tinymce/tiny_mce.js

2. 依序對上述四個檔案,用文字編輯器打開並尋找relative_urls這個關鍵字,將它的設定值改為以下:
    _def(“relative_urls”, false);
3. 確定你已經修正完上述四個檔案,那就好好享受它吧!
【重要】請注意你的瀏覽器(Ex. Chrome, Firefox)的快取。若你確定已經修改好這些.js檔案,但還是出現自動轉成相對路徑的情形。請試著清除你的瀏覽器快取,因為它可能為了加速的原因,將你的舊的.js檔案給快取住了。

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like these