Deleting pages from books and other Drupal gotchas

There is a significant differance between the behaviour of the drupal edit books admin pages and the drupal menus admin pages.  Specifically the delete link does very different things.

Drupal -> Admin -> Menus -> Menuname (edit)

drupal-book-gotcha

Drupal -> Admin -> Books -> Bookname (edit order and titles)

drupal-menu-gotcha

The delete buttons on the lists of items in these two core drupal module do very different things.  Clicking delete in the edit list in the book module deletes the node, whereas clicking on delete in the menu module just deletes the menu item and leaves the node in place.

 

 

Comments [0]

Update on Blackboard and Firefox 3.6 - Badly formatted request issue

I posted earlier on a problem with  Firefox 3.5/6, caching and etags headers and Blackboard 7.3. 

The issue appears the second time they click on the xid-9999 redirect which is shown when a file resource appears in a content list.  The message is 

400 BADLY FORMATTED REQUEST, Tomcat / Apache error message

Possble solution - have apache intercept and rewrite the headers for urls in this format.  Check that mod_headers is enabled in apache and add the following to the apache config file.



<LocationMatch "/bbcswebdav/xid-*">
    Header unset If-Modified-Since
    Header unset If-None-Match
</LocationMatch>


   

Comments [0]

Blackboard and Firefox 3.6 - Badly formatted request

Came across an odd problem with Blackboard 7.3 server and Firefox 3.6.  It seems that our users who have upgraded to Firefox 3.6 are encountering a problem when they view web resource linked using xid-9999 type urls. 

The first time someone clicks on an item linked to a file resource in a content list it appears normally.

But the second time they try to click on the link to the resource, they see:

400 BADLY FORMATTED REQUEST, Tomcat / Apache error message

It appers that the crux of the problem is how Firefox 3.6 responds to caching and etags headers.

One workaround for now is to clear your cache using Firefox / Preferences / Advanced / Network / Clear Now

Update: posted a proposed solution using apache to clean up the requests

Here's the long version......

We're using Blackboard v7.3.230.0 running on Tomcat 5.5.26 on Apache 1.3. 

The linked items use a perminant url in the formal /xid-98788.  Requests for this page are then redirected to the current version of the file in the content collection.  I notice that the server returns an etag and expires header even on the 302 temporary redirect responses.  It does not include nocache headers and it uses the same dummy etag for every response, and an expires header in +24 hours.

When Firefox 3.6 requests the /xid-99999 resource it includes the etag and an if-modified-since header based on the previous last modified date.

The Blackboard / Tomcat server doesn't seem to like these headers and throws a 400 Badly formatted request error.

 

The first time Firefox 3.6 requests the page

GET http://vision.hw.ac.uk/bbcswebdav/xid-310314_2

The response is:

302 Moved Temporarily

Response headers include:



Date: Fri, 12 Mar 2010 14:33:41 GMT
X-Blackboard-product: Blackboard Academic Suite&#8482; 7.3.230.0
Cache-Control: public
<strong>Etag: bb-cache-1</strong>
<strong>Last-Modified: Thu, 13 Nov 2008 18:16:31 GMT</strong>
<strong>Expires: Sat, 12 Mar 2011 14:33:41 GMT</strong>
Content-Disposition: filename="index.htm", filename="index.htm", filename="index.htm", filename="index.htm", filename="index
.htm"
Location: http://vision.hw.ac.uk/bbcswebdav/courses/COURSENAME/somedir/ufp1/index.htm
Content-Length: 0
Keep-Alive: timeout=15, max=96
Connection: Keep-Alive
Content-Type: application/octet-stream;charset=UTF-8


The second time Firefox requests the page:

GET http://vision.hw.ac.uk/bbcswebdav/xid-310314_2

Unlike previous versiosn of Firefox eg. 3.0.17, in firefox 3.6, two extra request headers are sent -

 

<strong>If-Modified-Since: Thu, 13 Nov 2008 18:16:31 GMT</strong>
<strong>If-None-Match: bb-cache-1</strong>

Reponse is:

400_BADLY_FORMATTED_REQUEST

and includes these headers:

X-Blackboard-product: Blackboard Academic Suite&#8482; 7.3.230.0
Cache-Control: public
Etag: bb-cache-1
Last-Modified: Thu, 13 Nov 2008 18:16:31 GMT
Expires: Sat, 12 Mar 2011 14:49:32 GMT

Regular files in content collection as opposed to xid refereces are served up to Firefox 3.6 normally, so you may reload a page several times once you have been redirected, but using the link from the list of resources twice causes the problem.

GET http://vision.hw.ac.uk/bbcswebdav/courses/COURSENAME/somedir/index.html

Response 200 OK

Request headers include:

http://vision.hw.ac.uk/bbcswebdav/courses/B21UF_2009-2010/ultrafast/index.html

If-Modified-Since: Fri, 12 Mar 2010 15:31:17 GMT
If-None-Match: "227921-219620"

Response headers include

Pragma    no-cache
Cache-Control    no-cache
Etag    "227921-219620"
X-Blackboard-product    Blackboard Academic Suite&#8482; 7.3.230.0

Reposne headers include:

Pragma: no-cache
 Cache-Control: private
Etag: "227921-219620"
Last-Modified: Wed, 22 Apr 2009 11:23:27 GMT
Expires: Thu, 12 Mar 2009 14:49:25 GMT

Workaround for now - use another browser? Chrome, Safari.  Or in Firefox clear the cache when you see this issue.

Comments [0]

Re-inventing my blog

So I've decided to dust off the blog, and migrate all my old typepad posts over to blog.seanfarrell.co.uk.   Promised to do some more blogging and write up some of the things that I have been up to recently.

Comments [0]

Public courses from a noguest moodle

Our VLE is set.up primarily to give our students access to course resources, however it has been taken on by some research groups as collaboration space. Some of the groups are interested in making their areas public and allowing people without accounts access. The difficulty arrises because we want to be able to quickly change courses between 3 levels of access - closed : enrolled students and staff only preview : any student or staff has read only access public : open to external visitors as guest We presently use the 'guest' faculity to provide the preview access within a closed (no guest/google) moodle. Couple of options come to mind: 1. Close all courses to guest access, and then enable preview access using role overrides at category or course level. The enable public guest access. 2. Pinhole for specific courses by tweaking login and require_login() function. (If only there was a hook, or I was confident enough to install php pecl runkit) 3. Create a paralled networked moodle, where public courses can be hosted with different permissions Number 3 looks like the way we are going - a networked moodle means that we can give our internal users permissions to manage their courses, and also permit guest access or self registered users in a more public space.

Comments [0]

Moodle and Mediafilter - disabling inline flash

So among the small things I've found out today is that moodle does some interesting things when you upload html pages and try to serve them through a moodle course. If the filter files configuration is on then the moodle text filters may rewrite things in the file, making smilies appear or adding the theme css and moodle javascripts eg. Ufo.js to the header of the file. It also means that if mediafilter is turned on, links like a href="something.swf" are automatically rewritten into an embedded flash object. Quick tip to disable this is to add a question mark onto the end of the filename. A href="something.swf?" will not be rewritten.

Comments [0]

date/time value reaches 1234567890 tonight

Many computer systems represent date and time values by counting the number of seconds since a specific date and time. The commonly used UNIX date time value counts from 1 January 1970 00:00 GMT.  

At 23:31:30 GMT today (Friday 13 February 2009) the unix datetime value reaches the integer number 1234567890.

Frequently asked questions
Q1: Is there a website where I can see a countdown?

Q2: Will anything bad happen? 
A: Probably not.  We have another 29 years before we reach the maximum 32 bit value for this time, see wikipedia on the 2k38 problem

Q3: Is this important?
A: Not really[1], just a cool number.  

Q4: How do I turn a number into a local date/time?
A: date -r 1234567890

Q5: How do I find out what time it is in this form
A: date +%s

Q6: But I don't have  a unix machine?

--
[1]: Unless you wrote some code in the 80's or 90's and never imagined we'd still run your program, or have working computers after y2k and decided that 1234567890 was a nice number to represent something like 'end of file', or 'initiate self destruct sequence'.

Comments [0]

Telescopic Text story

A nice little story about making a cup of tea by Joe Davis which uses javascript to expand and re-wite the story word by word.

Telescopic Text is a short story by Joe Davis. ...
Telescopic Text is a short story by Joe Davis. The story expands word by word. ....

I wonder if something similar might be a nice starter or exercise from writing in English?

My first thought was some kind of programming project to write a telescopic text editor. 

On second thought though, perhaps it is simpler to use a bit of paper.  Start with a sentence at the top of the page, and progressively rewrite adding or replacing words to make the story longer and longer, as exercise in drafting and rewriting.

Comments [0]

passing time with android phone

We've excused ourselves from part of a family get together in theWe've excused ourselves from part of a family get together in the pre-Christmas weekend. Having a baby is a great excuse for afternoon naps. Having exhausted all of the hotel room TV and radio options, we turned to the G1 phone for entertainment. Loaded up the Last.FM player (aLastFM) and searched for the word "christmas". We now have our own personal christmas-musak. (You can also listen to this from the Last.FM website on a real computer. Even better, the android phone is letting me carry on web browsing, twittering and now writing a blog post with almost no skips or halts in the music. You can see the track name by sliding down the notification area, and also to quickly go back to the player and skip or ban an unwanted song. Feeling a bit more Christmas-y now.

Comments [0]

Baby Changing Aerobics

There are meny things that I'll try doing in order to keep the baby entertained. He often starts to get upset when being changed, or getting ready for bed.

One of our early tricks was just to stop freeze, or pretend to be a tree. Drama classes come in handy for something. We've now moved on and playing peel-a-boo is a favorite at the moment.

Silliest thing so far has been playing out part of the film Monstors Inc. "scarry feet, scary feet - kid's awake", Jumping up and down and hiding under by lying flat on the floor.

This is aso how I noticed the strange feeling that I get in my wrists if I jump up and down while my hands are raised in the air (I get a rebounding pulse-like feeling in my wrists when I do this).

I feel a Doctor Doctor joke coming on : "Doctor, Doctor ... I get a funny feeling when I jump up and down, with my arms in the air"

Comments [0]