Shorty1968
Erfahrenes Mitglied
Hallo ich bekomme folgende Fehlermeldung.
Die Zeile die für den Fehler verantwortlich ist sieht so aus.
Was kann ich tun damit der Fehler weg geht und die Funktionen vorllständig erhalten bleiben?
Zeilen vor dem Code.
Zeilen nach dem Code.
Code:
Fatal error: Object 'com.example.wcf.examplePlugin.entry' with packageID '704' is invalid
Information:
error message: Object 'com.example.wcf.examplePlugin.entry' with packageID '704' is invalid
error code: 0
file: /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/data/rating/Rating.class.php (50)
php version: 5.3.3-7+squeeze15
wcf version: 1.1.9 (Tempest)
date: Tue, 16 Apr 2013 13:59:38 +0000
request: /phpmyadminDBsichern.html
referer: http://www.wbb-support.eu/tutorialAdd.html
Stacktrace:
#0 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/page/TutorialSystemTutorialPage.class.php(187): Rating->__construct('wcf.tutorialsys...', '1', '704')
#1 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/page/AbstractPage.class.php(90): TutorialSystemTutorialPage->readData()
#2 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/page/TutorialSystemTutorialPage.class.php(335): AbstractPage->show()
#3 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/page/AbstractPage.class.php(46): TutorialSystemTutorialPage->show()
#4 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/util/RequestHandler.class.php(64): AbstractPage->__construct()
#5 /var/www/vhosts/wbb-support.eu/httpdocs/wcf/lib/util/RequestHandler.class.php(92): RequestHandler->__construct('TutorialSystemT...', Array, 'page')
#6 /var/www/vhosts/wbb-support.eu/httpdocs/index.php(8): RequestHandler::handle(Array)
#7 {main}
PHP:
$this->rating = new Rating('wcf.examplePlugin', $this->tutorial->tutorialID, $this->packageID);
Zeilen vor dem Code.
PHP:
/**
* @see Page::readData()
*/
public function readData() {
parent::readData();
// set default value
$userProfile = array();
// init new user profile object
$this->userProfile = new UserProfile($this->tutorial->userID);
// try to get package id
if (($this->packageID = WCF::getPackageID('eu.wbb-support.TutorialSystem')) === null) {
// set cache file path
$cacheFilePath = WCF_DIR . 'cache/cache.tutorialSystemPackageID.php';
// check for cache file
if (is_readable($cacheFilePath) == true) {
// get package id from cache file
$this->packageID = intval(file_get_contents($cacheFilePath));
}
else {
// get package id from database
$sql = "SELECT packageID
FROM wcf".WCF_N."_package
WHERE package = 'eu.wbb-support.TutorialSystem'";
$row = WCF::getDB()->getFirstRow($sql);
// set package id
$this->packageID = $row['packageID'];
// write package id to cache file
$cacheFile = new File($cacheFilePath);
$cacheFile->write($this->packageID);
$cacheFile->close();
}
}
PHP:
// init comment list
$this->commentList->sqlOffset = ($this->pageNo - 1) * $this->itemsPerPage;
$this->commentList->sqlLimit = $this->itemsPerPage;
$this->commentList->readObjects();
// read categories
$categoryIDs = explode(',', $this->tutorial->categoryIDs);
foreach ($categoryIDs as $categoryID) {
// set category to list
$this->categories[$categoryID] = TutorialSystemCategory::getCategory($categoryID);
// set number to list
if ($this->categories[$categoryID]->prefixName) $this->numbers[$categoryID] = $this->categories[$categoryID]->prefixName . str_pad($this->tutorial->tutorialID, 6, '0', STR_PAD_LEFT);
}
// read visits
$sql = "SELECT *
FROM wcf".WCF_N."_tutorialsystem_tutorial_visit
WHERE tutorialID = ".$this->tutorial->tutorialID."
ORDER BY lastVisitTime DESC
LIMIT 5";
$result = WCF::getDB()->sendQuery($sql);
while ($row = WCF::getDB()->fetchArray($result)) {
if (!isset($userProfile[$row['userID']])) $userProfile[$row['userID']] = new UserProfile($row['userID']);
$row['userProfile'] = $userProfile[$row['userID']];
$this->visits[] = $row;
}