Description

We're using MoinMoin on our Intranet. Internet Explorer has this thing called "Compatibility View" and it appears that by default it is set to "Display intranet sites in Compatibility View"

It turns out that the MoinMoin page content (using the default Modernized theme) is invisible when the page is rendered in this compatibility view.

Steps to reproduce

  1. Install Internet Explorer 11
  2. You probably didn't get to this step because you didn't want to or couldn't install IE. If you did get here then continue to the next step.
  3. Navigate to any MoinMoin 1.9.8 wiki which is using the Modernized theme.

  4. Copy the URL of the MoinMoin wiki and add it to the Compatibility View list (Alt -> Menu -> Tools -> Compatibility View Settings). Screenshot: https://help.blackboard.com/@api/deki/files/46269/ie9ux.pd.local_Compatibility_View.png

  5. Navigate around the wiki and observe that page content (actually wiki data) appears completely blank.

Example

Component selection

\MoinMoin\theme\__init__.py -> ThemeBase.send_title()

Details

MoinMoin Version

1.9.8

OS and Version

Windows 7 Professional

Python Version

Python 2.7.5

Server Setup

Using standalone Wiki server

Server Details

Listens on port 80 only. Used only on our Intranet. "wiki" resolves to the machine hosting the wiki.

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

I've worked around this issue by including the following meta element in the <head> of every rendered MoinMoin page:

   1 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

This has the effect of making IE not render in Compatibilty View mode even when "Display intranet sites in Compatibility View" is checked.

I added this meta element inside \MoinMoin\theme\__init__.py -> ThemeBase.send_title().

Like this (line 11 is the line I added)...

   1         if 'pi_refresh' in keywords and keywords['pi_refresh']:
   2             user_head.append('<meta http-equiv="refresh" content="%d;URL=%s">' % keywords['pi_refresh'])
   3 
   4         # output buffering increases latency but increases throughput as well
   5         output = []
   6         # later: <html xmlns=\"http://www.w3.org/1999/xhtml\">
   7         output.append("""\
   8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
   9 <html>
  10 <head>
  11 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  12 %s
  13 %s
  14 %s
  15 """ % (
  16             ''.join(user_head),
  17             self.html_head({
  18                 'page': page,
  19                 'title': text,
  20                 'sitename': request.cfg.html_pagetitle or request.cfg.sitename,
  21                 'print_mode': keywords.get('print_mode', False),
  22                 'media': keywords.get('media', 'screen'),
  23             }),
  24             keywords.get('html_head', ''),
  25         ))
  26 
  27         # Links
  28         output.append('<link rel="Start" href="%s">\n' % request.href(page_front_page))

I haven't researched this issue fully, but based on my work so far it would seem sensible to add this meta element line to MoinMoin by default.

There's a Microsoft document here which explains the effect that this meta element has on various version of IE: https://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx

The key point from that document is that: it states that using the meta element that I have used will "display the webpage in edge mode, which is the highest standards mode supported by Internet Explorer, from Internet Explorer 6 through IE11." So this effectively stops IE from treating the MoinMoin site like a dodgy old site with HTML designed for IE6.

Discussion

2015-06-13 k-method: I have tried to reproduce this issue by loading up other MoinMoin 1.9.8 wiki's that use the Modernized theme, in IE 11, compatibility view mode. So far I have been unable to reproduce the issue. One wiki I tried was: http://jurawiki.de/ - this wiki rendered fine even when I forced IE 11 into compatibility view mode.

Plan

I have also spent a lot of time on a similar issue. Added a pull request to https://bitbucket.org/thomaswaldmann/moin-1.9. -- RogerHaase 2015-07-19 19:19:45


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.9.8InternetExplorerCompatibilityViewIntranetRenderIssue (last edited 2015-07-19 19:19:45 by RogerHaase)