问题描述
我遵循了Joomla开发人员Wiki(http://docs.joomla.org/Developers#Developing_a_Model-View-Controller_.28MVC.29_Component_2)上的教程来创建Joomla组件.在Joomla 1.7中一切正常,但是当我升级到Joomla 2.5时,后端的复选框不再起作用.
I followed a tutorial from the Joomla developer wiki (http://docs.joomla.org/Developers#Developing_a_Model-View-Controller_.28MVC.29_Component_2) to create a Joomla component. It all worked fine in Joomla 1.7, but when I upgraded to Joomla 2.5 the checkboxes in the backend are not working any more.
我检查了 http://上的代码在Joomla 2.5扩展程序中的docs.joomla.org/Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-__Part_09#Adding_a_toolbar 仍处于选中状态的隐藏字段.此外,周围的JavaScript仍然相同.
I checked the code from http://docs.joomla.org/Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_09#Adding_a_toolbar in Joomla 2.5 extensions and the boxchecked hidden field is still there. Also the javascript around is still the same.
有人有同样的问题吗?
Does anyone has the same problem?
推荐答案
我发现了问题.表单名称旁边应有一个ID. Joomla 1.7仅检查名称,而Joomla 2.5正在检查ID.
I found the problem. The form should have a id next to the name. Joomla 1.7 is only checking on the name, but Joomla 2.5 is checking for the id.
这篇关于教程代码在Joomla 2.5中不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!