Footer funnies

October 13, 2015

Kenny reported problems when trying to make use of the new subsite footer options of the homepage content type. The problem appears to be our “local search” theme, not being compatible with the new multi-colours option of the latest UoE theme.

If you choose one of the multi-colours (or even the default red) from the homepage subsite settings, then you can add the footer stuff, and have it stick. The problem (I assume) is that this becomes a new theme, attached to that homepage, overriding whatever sitewide theme we may have (our localsearch version of UoE), and so we lose our localsearch and ability to hide the banner image.

Co-incidentally, IS were asking for my patches to EdWeb to support our RFC request. I explained that we didn’t actually patch EdWeb, but used our own theme, and offered to produce patches to the UoE theme that did the same. They were happy to just get my complete theme code, but perhaps we will have to go down the”patch EdWeb” route, rather than try to sub-theme. It will make upgrades more problematic, but should mean we have less issues when new features are added.

Of course, even better would be if our two RFCs (local search and hide banner) get accepted into the main EdWeb distro, then we won’t have to worry about patches or sub-themes.


EdWeb CAB submissions

October 9, 2015

The Uni EdWeb project now has a Change Advisory Board (CAB), and I’ve submitted the three things our local sub-theme of the UoE theme does as Requests For Change (RFCs) to the board chair – Stratos.

Of the 3 things: local search, removal of banner image and fixing the UoE crest and logo link. The first two have been submitted as RFCs, but the UoE crest link has already been recorded as a bug to be fixed. The RFCs can be seen at:

We’ve also been asked if we can provide a “budget” either in manpower or cash. I’ve said it’s unlikely, other than my patches, but I’ve asked Craig to clarify that.

Stratos has also asked if I would do a presentation at an upcoming Web Publishers monthly meeting. I’ve said I would, but will need to check some facts/bugs with the Web Project team before doing any slides.


Update to EdWeb 1.5 part2

September 24, 2015

I finally applied the latest EdWeb update (1.5) to web.inf. Having first given it a few dry runs on a clone site. It went mostly without incident, and so far no problems have been reported/spotted !

After trying the EdWeb update on a clone of web.inf, I noted that a few manual settings were not preserved following the update (something we’ve been warned about if we’re not using the Features module). I’ve noted those manual changes in my project directory (web-config-changes), but boil down to enabling the rich text editor toggle, and various Organic Group permissions for the new OG role “infweb editor” on the homepages OG node.

I also had to update our version of the UoE theme (with local search and no banner image) to match the latest page.tpl.php file.

To do the upgrade, the plan was to take a copy of the DB and edweb directory (so I could roll back if necessary), run the various recommended drush commands to do the actual update, update our local theme, and then re-apply the manual config changes. These were the steps I had to do when trying it on the clone.

However, during the actual upgrade, the “drush updatedb” terminated with an “uncrecoverable error”. It gave some warnings, as my test had done, but I’d not seen the unrecoverable error before. I decided to press on anyway.

The next drush command “drush up drupal”, warned that there were still DB updates pending, and proceeded to do them (in my previous test, this was uncessary), it ran through the updatedb again, and this time it completed without an error.

At this point the web site looked fine, I went to redo the manual configuration changes, but I didn’t need to. This time they had survived. Which was obviously good, but makes me wonder what is different about my cloned version of web.inf.

After some more checking that things seemed to be OK, I spotted that some “page not found” errors were being generated for requests to bootstrap.min.js. It turns out this was a change of location that I’d not spotted in the new UoE theme, so I had to update our local theme again to mirror the new location of the javascript file. I also took this opportunity to fix the UoE crest and logo link, which I’d just spotted took people to the web.inf front page, rather than

So all seems to have gone OK. It’s a bit of a concern that my clone of the live doesn’t seem to be an exact copy, given the behaviour differences during the updates. I’ll have to check that I’m not missing something, but it should be as simple as taking (and restoring) a copy of the edweb directory and the MySQL database, which is what I believe I’m doing.

Next to do will be to try the EASE/Cosign authentication again with this latest EdWeb release. IS have added my test webtest.inf to EASE, so I can try that to see if it “just works”, to rule out my previous difficulties when using our local Cosign.


Plone redirects

September 18, 2015

Kenny asked that we now start redirect requests from the old Plone student-services pages to the new EdWeb pages, rather than just relying on the “This is old” banner that put on all the Plone pages.

So he sent a list of specific “this goes to that” redirects and also a request for a “catch-all” so that all other old student-services pages just be redirect to the new student-services front page. Remembering that there are still small pockets of Plone content that are still needed (until we have restricted viewing permissions in EdWeb), and that these should be excluded from the redirects (and the “This is old” banner).

I set this up, and tidied up some of the other adhoc ISS redirects in the server config, and it nearly “just worked”! I missed a couple of things.

The Plone pages not redirected contained resources links to images, style sheets, javascript etc. As these were being caught by the catch-all and redirected, the remaining Plone pages soon looked broken! It was simply fixed by adding the various resource links to the exception list of what not to redirect. There was also a similar problem for the “your not authorised” page if you tried to access the remaining Plone content that required authorisation to view. It too was fixed the same way.

RewriteCond $1 !^/student-services/(acl_users|portal_javascripts|portal_css|porta_kss|kupudrawers|plonekupuimages|kupu[a-z]+\.xml|[^/]*.(gif|jpg|ico|png))
RewriteRule ^(/student-services/.*) [R=permanent,L]

Yes it could be a bit more efficient, but I think this is clearer!


Update to EdWeb 1.5 part1

September 13, 2015

Finally had some time to look at updating web.inf to the latest EdWeb release, 1.5. Rather than updating the live site, I first tried it out on a copy of web.inf running on adpurl. See my previous post on creating a script to now make creating a clone of web.inf.

Following the usual instruction on updating via drush on the web site, it sort of worked, but there were some obvious graphic anomalies. I guessed this was due to our local modified theme that gives us local search, and removes the banner image. To achieve those I had to ship a modified version of the page.tpl.php file from the normal UoE theme, and doing a diff I could see that some things had changed. So I’ve updated our theme page template with the differences from the latest 1.5 template.

The updated template fixed the layout, but some more work may be needed if our theme is to support the new colour palettes that 1.5 now supports. Simply giving one of them a quick test, replaced our theme altogether, so you got the “blue” theme for example, but you also got the banner image back and the default “search” search function. Fortunately Kenny says he’s happy with the default red scheme for now.

EdWeb updates always warn you about the possibility that some settings revert back to the EdWeb default during an update. With previous updates, we seem to have got away with this, but this time it looks like we haven’t. We’d changed some default settings so that web editors could opt NOT to use the WYSIWYG ckeditor, however this is one setting that’s been reverted back to default following the update, there could be others. The recommended solution is to use the “Features” module to record changes and then have them reapplied following updates. I’ve not yet spent any time looking at this, but it looks like I will now have to do so.

So as it stands, web.inf is still running 1.4, I’ll look at what other settings have been reset, and workout how to make them persistent via the Features module. That will be “part 2”.


Cloning web.inf

September 11, 2015

When testing updates of edweb, I’d just been manually coping the live edweb directory and the most recent mysql dump from web.inf, and then restoring them on my test machine. All fairly mechanical, so I decided to script it to make it more automatic.

The thoughts are that this will be useful for maintaining a DR copy of web.inf too. It works, but at the moment there are a couple of potential gotchas. The first is that I rsync the most recent mysql backup dump (we currently take them every 2 hours), but rsync the live/current edweb directory. So there could be a discrepancy between file changes (eg uploaded images) in the edweb dir, and any record of them in the DB which could be a couple of hours older.

This could be solved by rsyncing the corresponding regular tarball of the edweb dir that we also take every 2 hours, or by somehow running a remote ‘om mysql dump’ to generate a “now” copy of the DB. Either way there is still the possibility of the directory and mysql being slightly out of sync, as these are not atomic processes.

The other gotcha seems to be a bug in the mysql component. After doing the rsync and DB restore, I restart MySQL for good measure. The default is for the mysql component to do a mysql dump at “stop”. This seems to continue to run even after the component reports “stopped”, and if it is restarted while the dump is still running, problems ensue. My work around is to add an arbitrary sleep between the stop and start. (note that om mysql restart is also affected). This should be submitted as a bug against the mysql component.


EdWeb cron

August 20, 2015

While investigating the latest Drupal security update on web.inf, I noticed again that the cron jobs were behind schedule. I was under the apprehension that EdWeb used Drupal’s poor mans cron (or some version of it), apparently this is wrong.

So I’ve added a system cron to call the site’s cron.php with the necessary key. I’ve added the following to the live/edweb-school.h
!cron.additions mADD(edwebcron)
cron.add_edwebcron * * * * * wget -O - -q -t 1 http://EDWEB_SITE_NAME/cron.php?cron_key=EDWEB_SITE_CRONKEY

According to it should be run every minute, so that’s what I’ve setup. In the machine’s profile I define the CRONKEY and it’s all working fine. Slightly concerned about how much noise it might produce if the wget start producing output. We’ll see.


Missing rich text editor

August 20, 2015

Julian reported that using Firefox on DICE he was missing the rich text editor (ckeditor) when updating pages. Trying for myself on DICE and Firefox (SL7.1), I too noticed the rich text editor (RTE from now on) was missing. I tried using Chrome on DICE (which I normally use for Drupal), and indeed it works there.

I switched back to Firefox (FF) with the intention to inspect what was going on with the developer tools, but now the RTE was appearing fine! I tried Opera on SL6, and the RTE is missing for me, and no amount of visiting the same page with other browsers has made it reappear (like it seemed to do with Chrome and FF).

The old Plone site used to behave differently depending on which browser and OS you were using, I presume this is just a variation of that. With not all browser javascript/DOM models being equal. Though other seemingly complex bits that use Javascript, eg the SCALD media flyout, seems to work fine on all browsers.

While I was investigating this, I did the the browser developer tools reporting various CSS and Javascript errors/warnings. I’ll have to leave it for now, but when I next get a chance, I’ll see if the central EdWeb site gives the same behaviour and errors/warnings.


Old content warning banner and Google Analytics

August 11, 2015

Today Kenny asked for a couple of things. Since the replacement for went live yesterday ( he wants the old pages to have some sort of “Old content” warning and a link to the new site, until such time that we simply redirect old to new content. One snag is that not all the old content has moved, as we can’t support restricted pages on EdWeb yet, so they need to remain in Plone.

The correct way to do this, would be some clever Plone/Zope hacking, which some how decides to display the “Old content” warning or not. But I don’t know how to just do that, and I don’t think I should spend the time finding out, only for it to become redundant anyway. My hacky-ish solution is to update the Plone main template (which I’ve done for other tasks) – – and add the “Old content” text so that all pages get the warning. For those individual pages and sections (there’s about 6 in total), I’m going to then remove that markup via Apache filters . Hopefully with little more than a sed script. I might actually just set the CSS to “display: none”, we’ll see.

The other thing Kenny spotted was that by default the standalone EdWeb distro doesn’t include the University Google Analytics code (which our existing Plone pages have). So the quickest way to add that was to add a new block to the footer, with the required javascript. We also needed to add a new Drupal Text Format to allow us to enter the raw markup, as all the default UoE Text Formats strip the necessary tags. We set it so that only “system administrators” can use this Text Format to hopefully avoid any unexpected problems.

As I write this, the GA stuff is up and running, but I’m still working on the Plone “Old Content” warning. I’ve updated the template with an empty bit of markup just now, so I can test the removal bit.

EdWeb (not yet a) Project

August 11, 2015

I’ve had a long standing action to create a new entry for work done on getting our EdWeb based replacement for the www.inf Plone content running. As per usual I don’t seem to have quite managed that yet, even though I’ve been keeping a track of effort that I would have assigned to that project.

Though I’ve been keeping sort of notes in my home directory and in my time log, I’ve not been “blogging” about the project as we are supposed to do, so this is me starting that now. Mainly because of the couple of things I’ve done/are doing today. But I’ll post separately about those in a minute. It will also let me see if the hiearchical WP categories work as I expect.