Easy Post Format Breaks themes in Internet explorer

Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -
Number of replies: 26

After installing the Easy Post course format into Moodle 2.1.3+, then purging all caches, it appears that many of moodles themes break in Internet explorer. See images below.

They show the incorrect rendering after purging all caches, then clicking the continue button.

This behaviour is evident in the Kryslte2, Afterburner and Standard themes, and I suspect many more.

To rectify the problem I logged out, deleted the easypost folder from the .../course/format/ folder then restarted my moodle server and things returned to normal.

Interestingly when using Firefox 9.0.1 this behaviour didn't seem to be evident. Unfortunately my production site is tied to IE.

 

Krystle2 Theme after purging all caches

 

Afterburner Theme after purging all caches

 

Standard Theme after purging all caches

Could someone please shed some light on this issue.

Thanks in advance
Craig.

Average of ratings: -
In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Craig,

My hunch is the use of advanced CSS - 'div > .forumaddnew{display:none !important;}' which is why FF is ok but IE is not as the later tends to take longer to support modern thinking.  I think you should contact the maintainer in the first instance (http://moodle.org/plugins/view.php?plugin=format_easypost) or use FF with FireBug to discover if it is possible to write basic CSS that IE will understand that does the same thing.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Gareth,

I don't think that is the case as the section, where that class selector is used in easypost/lib.php, has been commented out using /* */ which if I have this corrent, that type of comment out does not work in PHP in Moodle. you either use // or # on each line.

So perhaps this is causeing the problems experienced by Crieg.

I also think that all the callback_social should be written as callback_easypost_social to define it as part of this plugun, otherwise it nothing more than the social format, and you can't have two the same or they conflict. Same like it is in theme in advanced theme designing when copying functions into the lib.php of a theme.

Unfortunately I don;t know enough about course formats, but they do have similarities to themes.

Cheers

Mary

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

The /* */ comment format will work in PHP as it has been used elsewhere.  I'm not sure about # as a comment prefix though.  Anyway, your right, that means that the CSS is not being used.

In lib.php all of the function names are wrong (as they do use the same format as themes) as they refer to the social format as you say.  They should be written as:

callback_easypost

etc.  where 'easypost' is the directory name in the '/course/format' directory, just like I have:

function callback_topcoll_request_key() {
return 'topcoll';
}

for my Collapsed Topics formats.

To be honest, I think I need to write a guide to custom course format development as I'm probably one of the most knowledgable persons on the subject.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Gareth,

I have PM'd the author of the course format as you suggested.

Thanks again,

Craig

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Craig,

Please see my post below as I think it is an IE fault and nothing to do with 'easypost'.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Gareth,
I saw your post but had already contacted the author earlier in the day.

Craig.

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

There are still some errors in Easy Post Format.  I though the plugin maintainer had fixed theme but hasn't.

Can you tell me Craig, if Standard, Afterburner and Krystle work normally without the Easy Post Format? Afterburner & Krystle use the same pagelayout, so in some respects are similar.But Standard is one on its own.

Cheers

Mary

 

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Mary,

I just tested Krystle2, Afterburner and Standard and they appear to be behaving normally after purging all caches without the Easypost format installed.

Ta.
Craig.

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Craig,

I just tested with IE (screen shot attached) and FF with Moodle 2.1.3+ and the EasyPost format installed and think it is an IE issue that only occurs on a 'Purge all caches'.  If you do that then refresh IE the problem disapears.  You do not have to remove 'easypost' format - just refresh the page once.  I tried this with and without compatibility mode and restarting IE.  I've also done a 'Purge all caches' without easypost installed and can replicate the same behaviour with the Afterburner theme.

So, I actually believe that this is nothing to do with easypost at all but rather yet another IE undocumented 'feature'.

Cheers,

Gareth

Attachment cm_ep_ie.png
In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Hi Gareth,

Sorry but the problem with the front page getting mashed doesn't work quite like that for me. I agree that it does seem to be an IE issue, though definitely triggered by the presence of easypost in the course formats directory. Refreshing the browser, closing & opening IE, restarting the moodle server has no effect. Easypost in => problems, easypost out=>no problems.

I've been experimenting a fair bit today and discovered some very interesting behaviour. I'll attempt to summarise below:

 

  1. Check browser mode is IE9 (using F12)
  2. Easypost not present - site behaves normally. Frontpage displays well in both after purge all caches FF9 & IE9 for both Admin User & Student User.
  3. Easypost placed in the ...course/format folder then purge all caches
  • Frontpage displays incorrectly in IE9 but OK in FF9
  • In IE9 other site pages checked display correctly (by no means a comprehensive search).
  • A course's format was set to easypost - Course seemed to display and function correctly in both IE9 & FF9 for Admin & Student users.
  • Different frontpage disply exhibited for Admin User (mashed) compared to Student User after purging all caches (see below).
    Frontpage display with Admin User Logged in. (N.B. the topic section is hidden hence semi transparent so is displaying correctly in that regard).
    Admin User Logged in
    Frontpage after logging out and/or Student User logged in - displays correctly (no other changes - simply logging out then back in with a test student ID.
    student user logged in

 

 

4. Delete Easypost from the course/format folder then purge all caches. Frontpage displays correctly as above in both IE9 & FF9.

In all cases firefox seemed to display the site correctly and the issues seem to be with IE. This logic indicates that the easypost course format is basically ok and seems to function correctly.

Unfortunately the correlation between IE's display issues and easypost being in/out is too strong to disregard. I can't pretent to understand the finer details of why it's happening but it certainly needs to be worked through at some stage.

I hope this clarify's my issues.

Regards,
Craig.

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Craig,

With this account of what you see before and after using Easypost, has solved a problem I have just been struggling with which I reported as a Moodle BUG in tracker issue MDL-31057

Reading your discription of Admin frontpage getting 'mashed' but was OK in student view of the frontpage, was exactly what I was getting but, as I had only installed Easypost, but had not used it, so I never gave it a thought. But once I had removed it just now, the problem with the frontpage corrected itself and all is well.

So thanks for that.

Here's a screenshot I got of Afterburner and page source code as viewed in Firefox using Firebug.  The page source is all 'mashed-up'.

Notice the gap at the top of the page. That was what I was wanting to stop happening. 

It would be interesting to find out which files Moodle calls to make the frontpage different in Admin view, enough to distort a page. Fortunately in FF9 it looks OK but in IE is not good.

Cheers

Mary

1. ADMIN VIEW

 

2/ STUDENT VIEW

 

MDL-31057-Student.jpg" alt="" width="1024" height="423" />

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary and Craig,

After extensive testing in IE9 I have discovered that it is not 'easypost' but the number of addtional custom course formats that appear to cause an issue.  If you have two or more custom formats installed (I was using my own Collapsed Topics and Collapsed Weeks) you are more likely to get rendering errors in IE9 (not Quirks mode) on a 'Purge all caches'.

I also discovered that the 'Krystie2' theme is more subseptible to rendering issues than the 'Afterburner' theme - more so in 'Quirks' mode.

I think that's it, but I got a bit lost in the end of the different testing paths I had taken.  Ultimately the main issue here yet again is IE despite there being a possible relationship to MDL-31057 with the installation / deinstallation of custom course formats.  Mary - do you get the same issue if you install / deinstall another custom course format - say mine? If so, there could be a core code issue.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Gareth/Mary,

Thanks again for the effort you are all going to to try to get to the bottom of this.

It is a real concern though that two or more custom formats installed may be causing a problem. I would have thought that it should be possible to install as many of the custom formats as desired, without issue.

Currently on my test site I have the following custom formats that seem to be working ok:

  • onetopic,
  • topic forums,
  • collapsed weeks &
  • collapsed topics.

These all seem to function correctly and that is definitely more than two custom formats.

The two formats that I have had issues with are grid format (much discussion in the forums) and easypost (as above). I have uninstalled both of these for now.

Regards,
Craig.

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I took out Topic forum as well as Easypost. I have since tidied Easypost up and find my theme works fine. If you would like a copy of this send me your email in a PM.

I'll try adding Topic Forum back abd see where that gets me.

M

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Yep! You are so right Gareth. The strange behaviour returns if you have more than one course format plugin, which suggests this is a Moodle BUG isn't it?

We could link this finding to MDL-31057 and see if we can get it fixed?

Cheers

Mary

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

As soon as I get time I'll do a bit more digging around to see if I can test further as I have a local WAMP with the latest Moodle 1.9, 2.0, 2.1, 2.2 and 2.3dev installed - and see if the issue is in other versions.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

I could not resist a quick test and found that the problem happens with IE9 in normal mode with the current latest Moodle 2.0, 2.1, 2.2 and 2.3 dev when you do the 'Purge all caches' - I tested with the standard theme in 2.0 and 2.3 and Afterburner in 2.1 and 2.2.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

I did some more digging around and discovered that when you do a 'Purge all caches' in IE9 with two or more course formats installed and then do a 'View source' you find that the source has an extra 'FF FE' bytes at the start when compared to a page refresh version which is ok, please see attached screen shot with the 'good' on the left and the 'bad' on the right - created with WinMerge (http://winmerge.org/) and HexDump (http://www.saltybrine.com/hexdump32.htm).  I think there are two bytes per character because of being in UTF-8 format.

IE being IE seems to be confused by this and could not be interpreting the 'DOCTYPE' so does not know how to render the page correctly.

This smells like a PHP / Apache bug - I'm running Zend Server CE version 5.1.0 with PHP 5.3.5 and Apache 2.2.16.

Cheers,

Gareth

Attachment pac_oddity.png
In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

This is with Safari 5.1.2 identical test on Moodle 2 with again good on the left and bad on the right.

Attachment pac_oddity2.png
In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

And Firefox 8.0.1 identical test on Moodle 2 with again good on the left and bad on the right.

Attachment pac_oddity3.png
In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

And finally Chrome 16.0.912.75 identical test on Moodle 2 with again good on the left and bad on the right.

BTW: ZendServer-CE-5.1.0_B104-5.3.5-Windows_x86 on WIndows 7 64bit ultimate.

Cheers,

Gareth

Attachment pac_oddity4.png
In reply to Gareth J Barnard

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Just upgraded to Zend Server CE 5.6 with Apache 2.2.21 and PHP 5.3.9 and still get the issue sad.  Also manifests itself you have more than one lanuage installed and you swap between lanuages using the 'Lanuage menu' (langmenu in Language Settings).

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Mary,

Thanks for your easypost.zip file. I just installed your updated easypost this morning without removing any other course formats and still had display issues  in IE9.

Initially:

  • deleted old easypost from the course formats,
  • replaced with your easypost
  • go to Site Administration->Notifictions, then upgrade, success. -> continue. When returned to the notifications page it was a mess as before.
  • Frontpage also a mess.
  • -> purge all caches, that screen looked ok, after purging caches then continue, the purge all caches screen was then a mess, as was the frontpage.

It was interesting to watch frontpage load when both easypost and topic forums were installed. It looke like the text in the blocks would only fill the lefthand half of the available area (like some right padding or similar was introduced), the block header image would display momentarily, then the screen would blink and only the top half of the image would display with top portion of the block heading text as per previous screenshots.

I'm not sure what this means in terms of how the code executes but it's an observation.

 

Then:

Remove Topic Forums Format (leaving your easypost installed)

  • purge cahes screen still a mess after purging, though frontpage retuns to normal.

 

Remove easypost format - all returns to normal

Reinstall topic forums - after purging all caches the purge all caches screen is incorrect but frontpage is ok.

Thanks again for all of your work, but it still appears that easypost is still problematic for my test site.

Thanks again,
Craig

In reply to Craig Mackey

Re: Easy Post Format Breaks themes in Internet explorer

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Craig,

The problem you are having in IE looks like you have this in 'Quirks Mode'.

Check using F12 (function key) to see this is in IE9 Browser Mode and IE9 Standards. I thought I explained all this to you in Themes' Forum, but you may well have not understood me first time!

Cheers

Mary

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

I tested with and without 'Quirks Mode' which I called 'Compatibilty Mode' and the problem manifests itself after a 'Purge all caches' until you do a page refresh regardless of 'Quirks Mode' or if 'easypost' is installed or not - I tested with the 'Afterburner' theme and IE9 as shown above.

Seems to be a new IE undocumented 'feature' ;).

Cheers,

Gareth

In reply to Mary Evans

Re: Easy Post Format Breaks themes in Internet explorer

by Craig Mackey -

Hi Mary,

Sorry, but my browser was in IE9 mode. I understood your instructions re the F12 key and they worked well to identify the issue with the theme that I was having. It's now one of the first things that I check if things look strange.

Many thanks

Craig.