歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 26, 2024, 10:37:52 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  安裝後, 文章發表不出來, 何解? « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 安裝後, 文章發表不出來, 何解?  (閱讀 7012 次)
alan666
新手見習
*
文章: 3



檢視個人資料
« 於: 四月 25, 2006, 08:32:28 上午 »

大家好, 我是個新手, 剛安裝了Lifetype, 但完成安裝後, 在發表文章時出現以下問題 :

我以擁有Administrator的戶口發表文章, 在預覽文章時, 可以清楚看到內容, 但當按"發表"按鈕後, 文章的內容,標題和短標題都不見了.

我曾查找過數據庫中的article和article_text數據表,在article表中是能夠找到我剛新增文章的資料,但在article_text表是空的,一個數據資料也沒有.

在Apache server的error log中, 我找到這些error :

程式碼:
[Sun Apr 23 11:53:29 2006] [error] [client 127.0.0.1] PHP Notice:  
Object of class BlogSettings could not be converted to int in C:\\Program
Files\\Apache
Group\\Apache2\\htdocs\\vlog\\class\\dao\\bloginfo.class.php on line 55
[Sun Apr 23 11:53:29 2006] [error] [client 127.0.0.1] PHP Notice: 
Object of class BlogSettings could not be converted to int in C:\\Program
Files\\Apache
Group\\Apache2\\htdocs\\vlog\\class\\dao\\bloginfo.class.php on line 55

[Sun Apr 23 11:57:05 2006] [error] [client 127.0.0.1] PHP Notice: 
Object of class BlogInfo could not be converted to int in C:\\Program
Files\\Apache
Group\\Apache2\\htdocs\\vlog\\class\\action\\admin\\adminaction.class.php on line 113, referer: http://localhost/vlog/admin.php

[Sun Apr 23 11:57:09 2006] [warn] (OS 64)The specified network name is
no longer available.  : winnt_accept: Asynchronous AcceptEx failed.

[Sun Apr 23 11:58:07 2006] [error] [client 127.0.0.1] PHP Notice: 
Object of class BlogSettings could not be converted to int in C:\\Program
Files\\Apache
Group\\Apache2\\htdocs\\vlog\\class\\dao\\bloginfo.class.php on line 55, referer:
http://localhost/vlog/admin.php?op=blogSelect&blogId=2

現用的是LifeType 1.0.4的版本, 但曾安裝過1.0.3正式版都有相同的情況, 不知是不是在安置或設定時出現問題?

請各位高手的協助協助 , 謝謝


現在的系統是:

OS -- Window 2000
Web server -- Apache Server 2.0.55
PHP -- 5.1.2
MySql -- 5.0.20
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 四月 25, 2006, 01:06:11 下午 »

這是 bug, 可是有的人會發生,有的不會。這是因為用 Mysql 5 的關係。

修改 /class/dao/articles.class.php:

把:
引用
function addArticleText( $newArticle )
{
$filter = new Textfilter();
$prefix = $this->getPrefix();
$query = "INSERT INTO {$prefix}articles_text
(article_id, topic, text, normalized_text, normalized_topic)
VALUES( '".Db::qstr( $newArticle->getId())."', '".
Db::qstr($newArticle->getTopic())."','".
Db::qstr($newArticle->getText(false))."','".
$filter->normalizeText(Db::qstr($newArticle->getText(false)))."', '".
$filter->normalizeText(Db::qstr($newArticle->getTopic()))."')";

return( $this->Execute( $query ));
}

改為:

引用
function addArticleText( $newArticle )
{
$filter = new Textfilter();
$prefix = $this->getPrefix();
$query = "INSERT INTO {$prefix}articles_text
(article_id, topic, text, normalized_text, normalized_topic,mangled_topic)
VALUES( '".Db::qstr( $newArticle->getId())."', '".
Db::qstr($newArticle->getTopic())."','".
Db::qstr($newArticle->getText(false))."','".
$filter->normalizeText(Db::qstr($newArticle->getText(false)))."', '".
$filter->normalizeText(Db::qstr($newArticle->getTopic()))."', '".
$filter->normalizeText(Db::qstr($newArticle->getTopic()))."')";


return( $this->Execute( $query ));
}

原因請參考我在這一篇的 reply:http://forums.lifetype.net/viewtopic.php?t=4233&highlight=mysql5

Mark
已記錄

alan666
新手見習
*
文章: 3



檢視個人資料
« 回覆文章 #2 於: 四月 26, 2006, 08:11:42 上午 »

多謝Mark的協助,問題已經解決了,謝謝 微笑
已記錄
頁: [1]
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  安裝後, 文章發表不出來, 何解? « 上篇主題 下篇主題 »
    前往: