1 頁 (共 2 頁)

[問題] 推薦與嘔氣 安裝後的錯誤(已解決!! 謝捕手&倉大)

發表於 : 2006-03-01 23:40
kkt
問題外掛名稱: 推薦與嘔氣(世紀加強版)
參考連結: 推薦與嘔氣

安裝狀況:
SQL 執行順利
所有檔案修改須利

但衹有 viewtopic.php 出了問題, 參詳不透, 特來請教.

一旦把修改後的 viewtopic.php 上傳.
在主題點擊進入文章時, 便出現錯誤頁面如下:

代碼: 選擇全部

Could not obtain topic information

DEBUG MODE

SQL Error : 1054 Unknown column 't.topic_bumps' in 'field list'

SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, t.topic_bumps, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, COUNT(p2.post_id) AS prev_posts FROM kktfriend_topics t, kktfriend_forums f, kktfriend_posts p, kktfriend_posts p2 WHERE p.post_id = 93956 AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= 93956 AND f.forum_id = t.forum_id GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC

Line : 176
File : viewtopic.php
翻開 viewtopic.php 的 176 行, 又看不到那裡出錯.

這是 viewtopic.php 修收前, 及修改後, 及外掛原文壓縮路徑:

http://www.kktfriend.com/phpBB2/templat ... /vtphp.rar

請師長或大大指導一下.

ps. 本外掛爬文(相關搜尋)暫未有此問題.




.

....

發表於 : 2006-03-02 05:49
jwxie
我之前有裝這個外掛
第一次裝沒有問題
第二次自己去修改他, 也沒有問題
我記得第三次是兩個星期之前, 也是全新的2.0.19, 沒有問題

你的mysql執行了全部了嗎?你修改沒有錯, 我也是這樣子修改對的

代碼: 選擇全部

ALTER TABLE phpbb_posts_text 
ADD post_bump TINYINT(1) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD ngoodpost MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD goodpost_user TEXT NOT NULL;

ALTER TABLE phpbb_posts
ADD post_bump TINYINT(1) NOT NULL DEFAULT '0';

ALTER TABLE phpbb_topics
ADD topic_bumps TINYINT (2) NOT NULL DEFAULT '0',
ADD topic_goods MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD topic_ngoods MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;

ALTER TABLE phpbb_users
ADD user_gp MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD user_ngp MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;

你目前是那套, good&bad post還是 "good post"
另外, 你的論壇有好多的外掛....

發表於 : 2006-03-02 06:54
kkt
我裝的是推薦與嘔氣 ( good&bad post )

這一下錯誤可能要原作者才知道, 我反覆檢視了每一要修改的檔案,
未發現有出錯. SQL 執行成功.

就衹有 viewtopic.php 我用 Macromedia Dreamweaver 打開,
已發現 4 項錯誤. 如下:

代碼: 選擇全部

警告 Width 不得與行內及取代元素合用,否則可能會造成顯示上的問題,例如內容重疊或多餘的換行。Width 不適用於影像或表單欄位尺寸。
Netscape Navigator 4.0 
行 1192 <div style="width:30%"> 
錯誤 不支援 title 標籤的 IMG 屬性。
Netscape Navigator 4.0, Netscape Navigator 6.0 
行 1181 <img src="' . $images['signature'] . '" alt="' . $lang['Signature'] . '" title="' . $lang['Signature'] . '" border="0" /> 
also lines 1379, 1379 
錯誤 剖析樣式時發生錯誤
Netscape Navigator 4.0 
行 1157 " 
原因暫時不明.

ps. jwxie 我正是看過你的文章, 看了沒問題後才去試裝的呢...







.

發表於 : 2006-03-02 11:13
心靈捕手
To kkt:

如果以您上頭第一篇文章貼的錯誤訊息研判,
那麼出錯原因, 應該是尚未在 (資料表) phpbb_topics 建立 (欄位) topic_bumps

但是您卻又多次強調 'SQL 執行順利'

建議您:
進入 phpMyAdmin, 找到論壇資料庫後, 查看相關欄位是否已經新增?

發表於 : 2006-03-02 14:59
kkt
多謝捕手老師, 因為我執行 SQL 時顯示為 "成功執行"
外掛中沒有要說自行新增欄位, 所以沒有進入phpMyAdmin 查看, 進入後我找到phpbb_topics

查看後找到:
SQL 語法:
SELECT `topic_bumps`
FROM `phpbb_topics`
ORDER BY `topic_bumps` ASC
LIMIT 0 , 30

我便如圖一, 試著新增欄位. 但在 [執行] 後出現的圖二....

圖檔


但在圖二裡, 要填上很多欄位格式, 預設值等, 這個可難到了, 不知怎麼填啊.. :oops:

圖檔


ps. jwxie 如你看見本文, 想查詢你裝此外掛, 有否需自行新增欄位呢?

ps2. 如太複雜我自行找書K 一行囉..謝謝!!


.

發表於 : 2006-03-02 15:13
心靈捕手
To kkt:

您一旦有 'SQL 執行順利', 就表示已經新增相關欄位了;
就您的貼圖看來, 若資料庫無誤的話, 則相關的 '欄位' 都已經建立了,
可以不必再新增. (我先前只是懷疑您, 是否找錯資料庫而已)

放學後, 我再找時間試裝此外掛看看.

發表於 : 2006-03-02 15:16
~倉木麻衣~
你是不是找錯資料庫或資料表了?
首篇的錯誤訊息是
SQL Error : 1054 Unknown column 't.topic_bumps' in 'field list'
SELECT t.topic_id, ......., t.topic_bumps, ..... FROM kktfriend_topics t,
但你給的圖卻是phpbb_topics, 與你給的kktfriend_topics明顯不符

發表於 : 2006-03-02 17:16
kkt
多謝老師及倉大指導, 上圖真的找錯資料表, 在kktfriend_topics 確實未見topic_bumps 欄位.

我重新再執行 SQL 語法, 但卻不成功, 傳回:

代碼: 選擇全部


錯誤 
SQL 語法: 

ALTER TABLE phpbb_posts_text ADD post_bump TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD ngoodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD goodpost_user TEXT NOT NULL 

MySQL 傳回:  

#1060 - Duplicate column name 'post_bump' 
請問是那一個步驟出錯了 ? 3Q




.

發表於 : 2006-03-02 17:58
~倉木麻衣~
正因為你的資料表首不是以phpbb開頭, 所以你應該將SQL裡的phpbb_改成kkfriend_才對
ALTER TABLE kkfriend_posts_text ADD post_bump TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD ngoodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD goodpost_user TEXT NOT NULL

發表於 : 2006-03-02 20:06
心靈捕手
kkt 寫:多謝老師及倉大指導, 上圖真的找錯資料表, 在kktfriend_topics 確實未見topic_bumps 欄位.

我重新再執行 SQL 語法, 但卻不成功, 傳回:

代碼: 選擇全部


錯誤 
SQL 語法: 

ALTER TABLE phpbb_posts_text ADD post_bump TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD ngoodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD goodpost_user TEXT NOT NULL 

MySQL 傳回:  

#1060 - Duplicate column name 'post_bump' 
請問是那一個步驟出錯了 ? 3Q




.
依照這個錯誤訊息判斷,
主要出錯的原因, 是該欄位 'post_bump' 已經存在.

不過, 您似乎還是沒有找對 '資料庫' 執行 SQL?
否則的話, 出現的錯誤訊息, 應該是找不到資料表 'phpbb_posts_text' 才是.

也就是說, 當您找對了資料庫, 而要執行 SQL 時,
請參考 ~倉木麻衣~ 兄的作法, 自行更改指令裡頭的資料表首為 'kkfriend_', 才能順利執行.

發表於 : 2006-03-02 21:09
kkt
老師及倉大:

按倉大指導, 把SQL裡的phpbb_改成kkfriend_

也就是:

代碼: 選擇全部

ALTER TABLE kkfriend_posts_text 
ADD post_bump TINYINT(1) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD ngoodpost MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD goodpost_user TEXT NOT NULL;

ALTER TABLE kkfriend_posts
ADD post_bump TINYINT(1) NOT NULL DEFAULT '0';

ALTER TABLE kkfriend_topics
ADD topic_bumps TINYINT (2) NOT NULL DEFAULT '0',
ADD topic_goods MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD topic_ngoods MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;

ALTER TABLE kkfriend_users
ADD user_gp MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD user_ngp MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL;
但執行時不成功, 倒是昨天未改時反可執行. 但現在卻執行失敗.

ps. 肯定在 kktadmin_data 資料庫執行, 因衹有一個資料庫.
同時也看見需執行增加 SQL 的檔案.
kkfriend_posts_text // kkfriend_posts // kkfriend_topics //
kkfriend_users

但卻出現以下錯誤訊息, 再請教了. :oops:

代碼: 選擇全部

錯誤 
SQL 語法: 

ALTER TABLE kkfriend_posts_text ADD post_bump TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD goodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD ngoodpost MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
ADD goodpost_user TEXT NOT NULL 

MySQL 傳回:  

#1146 - Table 'kktadmin_data.kkfriend_posts_text' doesn't exist  






.

發表於 : 2006-03-02 21:28
心靈捕手
kkt 寫:多謝老師及倉大指導, 上圖真的找錯資料表, 在kktfriend_topics 確實未見topic_bumps 欄位.
您這裡的意思, 不是說您有一個資料表 'kktfriend_topics' ?

但是, 從您上頭的貼圖看來, 在 kktadmin_data 資料庫裡頭, 所有的資料表檔頭都是 'phpbb_', 所以我才會提醒您, 注意是不是找對資料庫?

如今, 您又說只有這個 kktadmin_data 資料庫, 這就叫人搞糊塗了.

莫非您連結進入 phpMyAdmin 的網址有錯?

發表於 : 2006-03-02 21:34
kkt
老師稍等, 我找個圖便明白.. ;-)

發表於 : 2006-03-02 21:36
心靈捕手
To kkt:

再試試看將輸入 SQL 指令的資料表檔頭改 'kktfriend_'

我沿用了 ~倉木麻衣~ 兄的筆誤. :mrgreen:

發表於 : 2006-03-02 21:51
kkt
To: 老師, 在圖內左面的資料庫選單中, 衹有kktfriend_data (67)
而另一個 test 是沒有資料的.

而我進入kktfriend_data (67) 資料庫, 在左列資料表,
我又確實找到了一個 (資料表) phpbb_topics 且看到建立了 (欄位) topic_bumps

但在 kktfriend_topics 內, 卻未有看見 topic_bumps

所以我想執行另一次 SQL 建立, 並按倉大指導去修改表頭執行.
但卻出現上文的錯誤.

我的 http://www.kktfriend.com/phpMyAdmin/kktadmin_data


圖檔




.