Ich habe Folgenden Fehler gefunden:
Eine News mit der ID 0 wurde in der Datenbank angelegt dabei erscheint folgender fehler wenn man die news unter dem link:
index.php?site=news_contents&newsID=0
aufruft
Notice: Undefined variable: parentID in /users/ratox/www/includes/plugins/news/news_comments.php on line 238
Notice: Undefined variable: type in /users/ratox/www/includes/plugins/news/news_comments.php on line 239
Notice: Undefined variable: parentID in /users/ratox/www/includes/plugins/news/news_comments.php on line 271
Notice: Undefined variable: type in /users/ratox/www/includes/plugins/news/news_comments.php on line 272
Lösung ist die tabelle in der Datenbank neu zu gestalten:
--START
CREATE TABLE `ws_w7d_plugins_news` (
`newsID` int(11) NOT NULL AUTO_INCREMENT,
`rubric` int(11) NOT NULL DEFAULT 0,
`date` int(14) NOT NULL DEFAULT 0,
`poster` int(11) NOT NULL DEFAULT 0,
`headline` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`link1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`window1` int(11) NOT NULL DEFAULT 0,
`link2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`window2` int(11) NOT NULL DEFAULT 0,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`banner` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`displayed` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`screens` text COLLATE utf8_unicode_ci NOT NULL,
`comments` int(1) NOT NULL DEFAULT 0,
PRIMARY KEY (NewsID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--END
Wichtiger Punkt dabei ist das die Spalte "newsID" daran gehindert wird den Wert "0" einzufügen und automatisch bei "1" Startet