關(guān)于DedeCMS 投票出現(xiàn)Request Error錯(cuò)誤的問題,相信有很多dedecms使用者都遇到了,今天織夢(mèng)58小編在織夢(mèng)論壇也看到很多詢問關(guān)于此問題的朋友,本想發(fā)帖告知解決方法,但織夢(mèng)限制15天外的帖子不能回復(fù),只好把教程先發(fā)在織夢(mèng)58網(wǎng)了,以下是原因及解決方法:
首先讓我們先來了解一下導(dǎo)致投票出現(xiàn)Request Error錯(cuò)誤的原因,很多朋友在織夢(mèng)論壇上也看到了其中的原因所在,那就是Fckeditor編輯器把以下代碼“吃”掉了:
Copy to ClipboardLiehuo.Net Codes引用的內(nèi)容:[www.dede58.com]
<input type='hidden' name='dopost' value='send' />
<input type='hidden' name='aid' value='2' />
<input type='hidden' name='ismore' value='0' />
丟失了以上代碼,所以在投票的時(shí)候,才會(huì)出現(xiàn)以上錯(cuò)誤?,F(xiàn)在知道了錯(cuò)誤,該如何解決呢?答:肯定是想辦法加上以上代碼,如何添加?其實(shí)非常簡單,因?yàn)橐陨洗a被放置在<table></table>之間,所以FCK才會(huì)清除以上代碼。那么我們來試著改變一下代碼的順序,以烈火網(wǎng)的《關(guān)于 Fireworks VS Photoshop 的壓縮率》中的投票為例,DEDE生成的默認(rèn)代碼如下:
Copy to ClipboardLiehuo.Net Codes引用的內(nèi)容:[www.dede58.com]
<table width='100%' border='0' cellspacing='1' cellpadding='1' bgcolor='#FFFFFF'>
<form name='voteform' method='post' action='/plus/vote.php' target='_blank'>
<input type='hidden' name='dopost' value='send' />
<input type='hidden' name='aid' value='2' />
<input type='hidden' name='ismore' value='0' />
<tr align='center'><td height='24' style='border:1px dashed #818279' bgcolor='#EDEDE2' ><strong>你使用什么設(shè)計(jì)軟件?</strong></td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='1' />PhotoShop</td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='2' />Fireworks</td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='3' />Other Soft</td></tr>
<tr><td height='24'>
<input type='submit' style='width:60px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt1' value='投票' />
<input type='button' style='width:80px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt2' value='查看結(jié)果' onClick="window.open('/plus/vote.php?dopost=view&aid=2');" /></td></tr>
</form>
</table>
我們只要將以上代碼修改為以下代碼即可。
Copy to ClipboardLiehuo.Net Codes引用的內(nèi)容:[www.dede58.com]
<form name='voteform' method='post' action='/plus/vote.php' target='_blank'>
<input type='hidden' name='dopost' value='send' />
<input type='hidden' name='aid' value='2' />
<input type='hidden' name='ismore' value='0' />
<table width='100%' border='0' cellspacing='1' cellpadding='1' bgcolor='#FFFFFF'>
<tr align='center'><td height='24' style='border:1px dashed #818279' bgcolor='#EDEDE2' ><strong>你使用什么設(shè)計(jì)軟件?</strong></td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='1' />PhotoShop</td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='2' />Fireworks</td></tr>
<tr><td height=24 bgcolor=#FFFFFF><input type='radio' name='voteitem' value='3' />Other Soft</td></tr>
<tr><td height='24'>
<input type='submit' style='width:60px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt1' value='投票' />
<input type='button' style='width:80px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt2' value='查看結(jié)果' onClick="window.open('/plus/vote.php?dopost=view&aid=2');" /></td></tr>
</form>
</table>
注意到?jīng)]有?我只是將以下代碼放在了<table>的上面:
Copy to ClipboardLiehuo.Net Codes引用的內(nèi)容:[www.dede58.com]
<form name='voteform' method='post' action='/plus/vote.php' target='_blank'>
<input type='hidden' name='dopost' value='send' />
<input type='hidden' name='aid' value='2' />
<input type='hidden' name='ismore' value='0' />
問題解決了,趕緊試試去吧。下一篇將介紹如何徹底杜絕此類問題——修改默認(rèn)生成代碼。