Nya content types visas inte under "Lägg till nytt innehåll".

Events happening in the community are now at Drupal community events on www.drupal.org.
lundahldaniel's picture

Hej allihopa!

Som titeln lyder så visas inte mina nya content types under menyn där man lägger till nytt innehåll.

Har kollat runt på nätet och hittat olika lösningar men som inte fungerat för mig.

Länken för att lägga till ny "infosida" t.ex. finns inte i "Lägg till nytt innehåll" och inte i "Navigation menu".

Kollar jag loggarna så får jag detta meddelande så fort jag klickar någonstans på siten:

PDOException: i _menu_router_save() (rad 3813 av /var/www/drupal/URLTILLSITEN/public_html/includes/menu.inc).

Denna rad ser ut så här: $insert->execute();

Som man finner i denna funktion:

function _menu_router_save($menu, $masks) {
  // Delete the existing router since we have some data to replace it.
  db_truncate('menu_router')->execute();

  // Prepare insert object.
  $insert = db_insert('menu_router')
    ->fields(array(
      'path',
      'load_functions',
      'to_arg_functions',
      'access_callback',
      'access_arguments',
      'page_callback',
      'page_arguments',
      'delivery_callback',
      'fit',
      'number_parts',
      'context',
      'tab_parent',
      'tab_root',
      'title',
      'title_callback',
      'title_arguments',
      'theme_callback',
      'theme_arguments',
      'type',
      'description',
      'position',
      'weight',
      'include_file',
    ));

  $num_records = 0;

  foreach ($menu as $path => $item) {
    // Fill in insert object values.
    $insert->values(array(
      'path' => $item['path'],
      'load_functions' => $item['load_functions'],
      'to_arg_functions' => $item['to_arg_functions'],
      'access_callback' => $item['access callback'],
      'access_arguments' => serialize($item['access arguments']),
      'page_callback' => $item['page callback'],
      'page_arguments' => serialize($item['page arguments']),
      'delivery_callback' => $item['delivery callback'],
      'fit' => $item['_fit'],
      'number_parts' => $item['_number_parts'],
      'context' => $item['context'],
      'tab_parent' => $item['tab_parent'],
      'tab_root' => $item['tab_root'],
      'title' => $item['title'],
      'title_callback' => $item['title callback'],
      'title_arguments' => ($item['title arguments'] ? serialize($item['title arguments']) : ''),
      'theme_callback' => $item['theme callback'],
      'theme_arguments' => serialize($item['theme arguments']),
      'type' => $item['type'],
      'description' => $item['description'],
      'position' => $item['position'],
      'weight' => $item['weight'],
      'include_file' => $item['include file'],
    ));

    // Execute in batches to avoid the memory overhead of all of those records
    // in the query object.
    if (++$num_records == 20) {
RAD 3813 ->  $insert->execute();
      $num_records = 0;
    }
  }
  // Insert any remaining records.
  $insert->execute();
  // Store the masks.
  variable_set('menu_masks', $masks);

  return $menu;
}

Någon som vet vad som menas med felmeddelandet? Någon som har en lösning?

Jag skulle bli mer än lycklig om någon kunde komma med riktlinjer till en lösning, eller kanske till och med lösningen!?

Med vänliga hälsningar,
Daniel Lundahl

Comments

Har du installerat någon

pontus_nilsson's picture

Har du installerat någon modul nyligen som kan ställt till det?

Har du någon custom kod som registrerar en path i hook_menu?

Använder du senaste versionen av Drupal?

Här kan du läsa om andra som rapporterat problemet.

//Pontus Nilsson, Digitalist

Sweden

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: