Leap2A Export has no dates

Bug #771597 reported by Scott William Gage
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Hugh Davenport

Bug Description

After installing 1.3.5 all exports have had missing dates. Tags such as <updated> and <published> come out like the following:

<updated>:</updated>
<published>:</published>

I've attached an example export.

Revision history for this message
Scott William Gage (scott-gage) wrote :
Changed in mahara:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 1.4.0
Revision history for this message
Darryl Hamilton (lordp) wrote :

Hi Scott

Would it be possible to get a database dump of this install? Or of a test install that still demonstrates the same problem?

Could you also attach the error log, preferably with entries around the time of the export?

From what I can see, the creation and modification times of the artefacts are set to something other than a date/time string - eg an empty string, null, or a number.

Thanks
Darryl

Revision history for this message
Scott William Gage (scott-gage) wrote : RE: [Bug 771597] Re: Leap2A Export has no dates

Hi Darryl,
I can provide a database dump; please find it attached. The install is just on my local machine for testing purposes, and I did an upgrade from 1.3.3 to 1.3.5 only recently.

When you mention the error log, do you mean the apache error log?

Cheers,
Scott Gage | Information Technologist – Learning and Teaching Systems  | University of South Australia
Tel: +61 8 830 26590 | Fax: +61 8 830 25800 | Lvl 1 W Building, Mawson Lakes Campus, Mawson Lakes, SA, 5095

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Darryl Hamilton
Sent: Thursday, 28 April 2011 8:17 AM
To: Scott Gage
Subject: [Bug 771597] Re: Leap2A Export has no dates

Hi Scott

Would it be possible to get a database dump of this install? Or of a test install that still demonstrates the same problem?

Could you also attach the error log, preferably with entries around the time of the export?

>From what I can see, the creation and modification times of the
artefacts are set to something other than a date/time string - eg an empty string, null, or a number.

Thanks
Darryl

--
You received this bug notification because you are a direct subscriber of the bug.
https://bugs.launchpad.net/bugs/771597

Title:
  Leap2A Export has no dates

Status in Mahara ePortfolio:
  Triaged

Bug description:
  After installing 1.3.5 all exports have had missing dates. Tags such
  as <updated> and <published> come out like the following:

  <updated>:</updated>
  <published>:</published>

  I've attached an example export.

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/mahara/+bug/771597/+subscribe

Revision history for this message
Darryl Hamilton (lordp) wrote :

Hi Scott

Thanks for the backup - unfortunately I can't import it as the version is unsupported. Is it from PostgreSQL 9.0?

If so, can you post an uncompressed one? (feel free to zip it afterwards)

And yes, the Apache error log.

Thanks
Darryl

Changed in mahara:
assignee: nobody → Darryl Hamilton (lordp)
Revision history for this message
Scott William Gage (scott-gage) wrote :

Hi Darryl,
Yeah, the backup was from PSQL 9 - just used their default backup format. Not to worry, it's a small database so I've just exported the SQL.

I've attached the SQL and Apache Error logs.

Cheers,

Scott Gage | Information Technologist – Learning and Teaching Systems  | University of South Australia
Tel: +61 8 830 26590 | Fax: +61 8 830 25800 | Lvl 1 W Building, Mawson Lakes Campus, Mawson Lakes, SA, 5095

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Darryl Hamilton
Sent: Thursday, 28 April 2011 9:43 AM
To: Scott Gage
Subject: [Bug 771597] Re: Leap2A Export has no dates

Hi Scott

Thanks for the backup - unfortunately I can't import it as the version is unsupported. Is it from PostgreSQL 9.0?

If so, can you post an uncompressed one? (feel free to zip it
afterwards)

And yes, the Apache error log.

Thanks
Darryl

** Changed in: mahara
     Assignee: (unassigned) => Darryl Hamilton (lordp)

--
You received this bug notification because you are a direct subscriber of the bug.
https://bugs.launchpad.net/bugs/771597

Title:
  Leap2A Export has no dates

Status in Mahara ePortfolio:
  Triaged

Bug description:
  After installing 1.3.5 all exports have had missing dates. Tags such
  as <updated> and <published> come out like the following:

  <updated>:</updated>
  <published>:</published>

  I've attached an example export.

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/mahara/+bug/771597/+subscribe

Darryl Hamilton (lordp)
Changed in mahara:
status: Triaged → In Progress
Revision history for this message
Darryl Hamilton (lordp) wrote :

Ok, nothing wrong with the database content, and the Apache error log didn't have anything useful.

However, I think I know what the problem is.

What is boils down to Mahara on a Windows host doesn't play nicely with the format string used by the format_date() function (returns false). This in turn means you end up with the dates being ':' as in the LEAP2A file attached.

The default format string is '%Y-%m-%dT%T%z' - the %T and %z parts do not seem to work on Windows (PHP 5.3.6).

There is a possible fix for this - instead of using strftime(), use date('c', $date) as this returns the same format for Linux and Windows hosts.

This is a change to one of the core parts of Mahara though, and will need a lot of testing to make sure the change doesn't break other things.

Darryl Hamilton (lordp)
tags: added: windows
Revision history for this message
Darryl Hamilton (lordp) wrote :

A partial fix has been committed for this problem - the export file will have better date values, but an import with that export file will still fail, unless the Leap2A XML file is edited beforehand.

The fix puts up a warning on the admin page if your installation is affected. From the testing I've done, it appears to only affect a Windows host.

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
François Marier (fmarier) wrote :

Just got a bug report from a user who is confused by the message we display:

"This warning is displayed on my site, but I'm not sure what it tells me as a Mahara admin. The message should be a bit more explicit and perhaps gives an idea of how to fix it. What does %z refer to?"

So perhaps we should say that %z is a "PHP date formatting code" and that "this problem is usually due to a limitation in running PHP on Windows".

Changed in mahara:
status: Fix Committed → Confirmed
Changed in mahara:
assignee: Darryl Hamilton (lordp) → Hugh Davenport (hugh-catalyst)
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :
Changed in mahara:
status: Confirmed → In Progress
Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.