Startseite
  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche
Startseite › Forum › Drupalcenter.de › Module ›

uc_google_base erweiterung für uebercart liefert 403 forbidden

Eingetragen von flomotion (1)
am 13.01.2010 - 18:52 Uhr in
  • Module
  • Drupal 5.x oder neuer

Hi Leute,

in meinen uebercart-shop habe ich die Erweiterung uc_google_base integriert um die Produkte auch an Google Base übermitteln zu können.
Solange ich eingeloggt bin, erhalte ich über den Pfad http://www.meine-seite.de/products/google_base.xml einen gut funktionierenden Feed.
Sobald ich aber ausgeloggt bin, dann erhalte ich beim aufruf ein 403 Forbidden für diese Seite.

Hat jemand ne Idee was ich da einstellen muss? In den Userrollen finde ich kein Feld um uc_google_base zu aktivieren.

Hier habe ich mal den Erweiterungscode:

<?php

/**
* Implementation of hook_menu().
*/
function uc_google_base_menu($may_cache) {
 
$items = array();

  if (
$may_cache) {
       
$items[] = array(
     
'path' => 'admin/store/settings/google_base',
     
'title' => t('Google Base Feed'),
     
'callback' => 'drupal_get_form',
     
'callback arguments' => array('uc_google_base_settings_form'),
     
'access' => user_access('administer store'),
           
'description' => t('Configure the google base feed settings')
    );
   
$items[] = array(
     
'path' => 'products/google_base.xml',
     
'title' => t('Google Base RSS Feed'),
     
'description' => t('Export of products in RSS for Google Base'),
     
'callback' => 'uc_google_base',
     
'type' => MENU_CALLBACK,
    );
  }

  return
$items;
}

/**
* Define the admin settings form
*/
function uc_google_base_settings_form() {
   
$form['google_base_feed_title'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Title'),
       
'#default_value' => variable_get('google_base_feed_title', 'My Google Base RSS Feed'),
    );
   
$form['google_base_feed_description'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Description'),
       
'#default_value' => variable_get('google_base_feed_description', 'My Google Base RSS Feed Description'),
    );
   
$form['google_base_feed_link'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Feed Link'),
       
'#default_value' => variable_get('google_base_feed_link', $GLOBALS['base_url']),
    );
    return
system_settings_form($form);
}


/**
* Create the google base feed
*/
function uc_google_base() {
 
$output = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
\n";
  $output .= "\n";
  $output .= "<rss version =\"2.0\" xmlns:g=\"http://base.google.com/ns/1.0\">\n";
  $output .= "\n";
  $output .= "<channel>\n";
  $output .= "\t<title>" . variable_get('google_base_feed_title', 'My Google Base RSS Feed') . "</title>\n";
  $output .= "\t<description>" . variable_get('google_base_feed_description', 'My Google Base RSS Feed Description') . "</description>\n";
  $output .= "\t<link>" . variable_get('google_base_feed_link', $GLOBALS['base_url']) . "</link>\n";
  $output .= "\n";

// Get active products
  $result = db_query("select node.nid from {uc_products} inner join {node} on uc_products.vid = node.vid where node.status = 1");
  while ($node = db_fetch_object($result)){
    $product = node_load($node->nid);
// Grab terms for products
    $terms = array();
    foreach ($product->taxonomy as $term) {
     $ancestors = taxonomy_get_parents_all($term->tid);
     foreach ($ancestors as $ancestor) {
       $terms[] = $ancestor->name;
     }
    }

// Build google base rss
$output .= "<item>\n";
    $output .= "<title>" . check_plain($product->title) . "</title>\n";
    $output .= "<g:department>" . check_plain(implode(', ', $terms)) . "</g:department>\n";
    $output .= "<description>" . check_plain($product->body) . "</description>\n";
    $output .= "<guid>" . htmlentities($product->model) . "</guid>\n";
    if (isset($product->field_image_cache) && file_exists($product->field_image_cache[0]['filepath'])){
      $output .= "<g:image_link>" . $GLOBALS['base_url'] .'/'. ($product->field_image_cache[0]['filepath']) . "</g:image_link>\n";
    }
    $output .= "<link>" . $GLOBALS['base_url'] . '/' . $product->path . "</link>\n";
    $output .= "<g:price>" . $product->sell_price . "</g:price>\n";
    $output .= "<g:product_type>" . check_plain(implode(',', $terms)) . "</g:product_type>\n";
    $output .= "<g:mpn>" . htmlentities($product->model) . "</g:mpn>\n";
    $output .= "<g:upc>000000000000</g:upc>\n";
    $output .= "</item>\n";
$output .= "\n";
  }

  $output .= "</channel>\n";
  $output .= "</rss>";
 
  drupal_set_header('Content-Type: application/xml');
  print($output);
  module_invoke_all('exit');
}

‹ Nervige Links entfernen [gelöst] Tutorial zu User Profil Panel gesucht ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

Hallo flomotion Der Fehler

Eingetragen von 1kubik (903)
am 14.01.2010 - 17:44 Uhr

Hallo flomotion

Der Fehler 403 ein Serverfehler
und wird zb von einer falsch konfigurierte htaccess Datei erzeugt
zb wegen falscher Pfade

hast du Zugriff auf die Error Log von Deinem Server?

  • Anmelden oder Registrieren um Kommentare zu schreiben

Benutzeranmeldung

  • Registrieren
  • Neues Passwort anfordern

Aktive Forenthemen

  • Beim Aufruf einiger Inhalte erhalte ich folgende Fehlermeldung
  • Neuinstallation: vermutlich ein rewrite-Problem
  • Drupal CMS installieren
  • [erledigt]MP3 in Drupal 10 einbinden
  • (gelöst)Drupal 11 installieren
  • Titel ausblenden
  • Ich brauche dringen Hilfe zu Updates oder ggf. wwie geht Composer?
  • Dynamische Ansicht von Seiteninhalt (als Tabelle?)
  • Vergabe von Berechtigungen für bestimmte Rollen; mir fehlt der Haken bzw. das „Veröffentlicht“
  • Medien und andere Daten mit Feeds von Drupal 7 auf Drupal 10 migrieren
  • Rolle erstellen nicht zu finden
  • für drupal11 ein Slider Modul
Weiter

Neue Kommentare

  • Gefunden
    vor 5 Wochen 6 Tagen
  • Vielen Dank für die ausführlichen Hinweise...
    vor 6 Wochen 3 Tagen
  • Mögliche Ursachen und nächste Schritte
    vor 6 Wochen 3 Tagen
  • Was für einen Server benutzt
    vor 8 Wochen 6 Tagen
  • Wenn die Subdomain auf
    vor 9 Wochen 1 Tag
  • ordnerstruktur
    vor 9 Wochen 1 Tag
  • Die Subdomain muß auf den
    vor 9 Wochen 4 Tagen
  • Verwende doch das Tag dafür,
    vor 12 Wochen 5 Tagen
  • Guckst du hier: step by step
    vor 12 Wochen 5 Tagen
  • Guckst du hier: step by step
    vor 12 Wochen 5 Tagen

Statistik

Beiträge im Forum: 250294
Registrierte User: 20535

Neue User:

  • DanielAltek
  • HilipPet
  • Henryskake

» Alle User anzeigen

User nach Punkten sortiert:
wla9466
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3857
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 35 Gäste online.

Hauptmenü

  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche

Quicklinks I

  • Infos
  • Drupal Showcase
  • Installation
  • Update
  • Forum
  • Team
  • Verhaltensregeln

Quicklinks II

  • Drupal Jobs
  • FAQ
  • Drupal-Kochbuch
  • Best Practice - Drupal Sites - Guidelines
  • Drupal How To's

Quicklinks III

  • Tipps & Tricks
  • Drupal Theme System
  • Theme Handbuch
  • Leitfaden zur Entwicklung von Modulen

RSS & Twitter

  • Drupal Planet deutsch
  • RSS Feed News
  • RSS Feed Planet
  • Twitter Drupalcenter
Drupalcenter Team | Impressum & Datenschutz | Kontakt
Angetrieben von Drupal | Drupal is a registered trademark of Dries Buytaert.
Drupal Initiative - Drupal Association