Attached a duration_combo field that I tried to import. It returns a blank screen and the field is not added. No idea if that is a problem of the duration module or the content_copy.module, but I have to start somewhere reporting this bug. I think however that it is sufficiently a bug for content_copy that it did not return with a sensitive error message or at least some explanation in watchdog.

CommentFileSizeAuthor
DrupalBugReportDurationExport.txt4.31 KBñull

Comments

karens’s picture

Project: Content Construction Kit (CCK) » Duration
Version: 6.x-2.6 » 6.x-1.0-rc2
Component: content_copy.module » Code

Report this on the Duration queue. The data in that field is totally non-standard, I'm not surprised it won't work.

yurtboy’s picture

KarenS,
Is there a better module or way to do this? Or is it worth fixing this module to be more standard?
Thanks

cdale’s picture

I was able to fix this by adding the following function into the Duration class in duration.inc. NOTE: This will require PHP 5.1.0 or greater to work


  static function __set_state($values) {
    $duration = duration_create();

    foreach ($values as $key => $value) {
      $duration->$key = $value;
    }

    return $duration;
  }