Programlama Drupal birden düğümler ekleme üzerine tarihi hatalar

0 Cevap php

Ben (diğer şeyler arasında) türü bir düğüm 'team_match' oluşturulan 'individual_match' tip birden fazla düğüm oluşturması bir Drupal modül inşa ediyorum. Bir team_match ilgili bireysel maçlar topluluğudur.

Ben yöntem eski bir yığın taşması sonrası bulduğu, Advomatic açıklanan kullanılır. (O düğümü oluşturur anlam) harika çalışıyor ama hepsi boş bir tarihe ait, hata mesajları bir sürü verir.

İşte hook_nodeapi işlevinden ilgili kodu:

    case 'insert':
      // insert individual matches when a team match is created
      if($node->type == 'team_match') {
        // Create node of type 'individual_match'
        // will be a loop, once date errors are sorted out
        $form_state = array();
        $tmp_node = new stdClass(); 
        $tmp_node->type = 'individual_match';
        // create form for new node
        $form_state['values']['type'] = $tmp_node->type;
        $form_state['values']['status'] = 1;
        $form_state['values']['title'] = $node->title;
        $form_state['values']['uid'] = $node->uid;
        $form_state['values']['name'] = $node->name;
        $form_state['values']['op'] = t('Save');  // This seems to be a required value.
        // Create the content.
        drupal_execute($tmp_node->type.'_node_form', $form_state,  &$tmp_node);
      }
    break;

Ve burada hata mesajları şunlardır:

  • Uyarı: date_offset_get () parametre 1 boş satır 491 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 494 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 495 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: date_offset_get () parametre 1 boş satır 497 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: date_timezone_set () parametre 1 boş satır 498 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: date_timezone_set () parametre 1 boş satır 499 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 500 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 501 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: date_timezone_set () parametre 1 boş satır 509 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: date_timezone_set () parametre 1 boş satır 510 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 511 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.
  • Uyarı: DATE_FORMAT () parametre 1 boş satır 514 / var / www / vhosts / example.com / httpdocs / siteler / all / modules / tarih / tarih / date_elements.inc verilen DateTime, olmasını bekler.

0 Cevap