I've fixed the problem by looking at the MW 1.32 codes for both Visual Editor and Flagged Rev.
For others who are encountering this problem - please see below
- Download Visual Editor and Flagged Rev extension for MW 1.32
- Copy the following files to your MW 1.31 environment
- FlaggedRevs\frontend\FlaggablePageView.php
- VisualEditor\modules\ve-mw\int\targets\ve.init.mw.DesktopArticleTarget.init.js
Explanation
- FlaggedRevision added "wgFlaggedRevsEditLatestRevision" config variable to check if the page you are looking at the is stable or latest version
- Please see line 1383 and 1384 in the FlaggablePageView.php from MW 1.32
- Using the newly added "wgFlaggedRevsEditLatestRevision" variable, Visual Editor can now determine if you are looking at the stable or the latest version
- Please see the line 491 in the ve.init.mw.DesktopArticleTarget.init.js from MW 1.32
I didn't read the entire script and have cause problem. If I find it, I will come back here to mention it.
Also, I will create a simple DL link that fixes both revision and media link issue later today when I get back home