Didi49
15 Jun 2012, 1:36 AM
Hello,
I was recently designated to update a component Joomla, which use the framework ExtJs.
I developped an application and when I incorporated it to the existent component I got some errors.
Most are resolved by updating ExtJs to 4.1.0 (before it was 4.0.X, I don't remember the number version).
So, when I updated the library, everything was working until I started to edit an article (always in Joomla). The application use Mootools to detect events which begin the recording process of the article (it's what i think to understand by reading the code in the component com_content). The message I received is :
TypeError: Property 'id' of object #<HTMLDocument> is not a function
Mootools takes back the form :
<script type="text/javascript">
Joomla.submitbutton = function(task) { if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) {Uncaught TypeError: Property 'id' of object #<HTMLDocument> is not a function if (tinyMCE.get("jform_articletext").isHidden()) {tinyMCE.get("jform_articletext").show()}; tinyMCE.get("jform_articletext").save(); Joomla.submitform(task, document.getElementById('item-form')); } else { alert('Formulaire invalide'); } }
</script>
This is the code if the component com_content, wrote by Joomla and I don't think it's judicious change it. The problem appears when the form is recovered : document.id('item-form')).
A plugin is installed at the same time of the component where I intervene which allow to add a button in the editing page of article and which control the apparition of a windows created by ExtJs.
So this library is loaded at the same time of this page. I made some test : I removed the javascript code which call ExtJs functions without remove the library, it doesn't work. When I removed all (code and library refering to ExtJs), I can record my article.
All along the development of my application on Joomla, I got this type of error but it never blocked the functionning. Until now ...
I hope somebody can help me, and for that I wish I made myself clear.
(forgive my english, I'm french ... :))
Thank you
I was recently designated to update a component Joomla, which use the framework ExtJs.
I developped an application and when I incorporated it to the existent component I got some errors.
Most are resolved by updating ExtJs to 4.1.0 (before it was 4.0.X, I don't remember the number version).
So, when I updated the library, everything was working until I started to edit an article (always in Joomla). The application use Mootools to detect events which begin the recording process of the article (it's what i think to understand by reading the code in the component com_content). The message I received is :
TypeError: Property 'id' of object #<HTMLDocument> is not a function
Mootools takes back the form :
<script type="text/javascript">
Joomla.submitbutton = function(task) { if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) {Uncaught TypeError: Property 'id' of object #<HTMLDocument> is not a function if (tinyMCE.get("jform_articletext").isHidden()) {tinyMCE.get("jform_articletext").show()}; tinyMCE.get("jform_articletext").save(); Joomla.submitform(task, document.getElementById('item-form')); } else { alert('Formulaire invalide'); } }
</script>
This is the code if the component com_content, wrote by Joomla and I don't think it's judicious change it. The problem appears when the form is recovered : document.id('item-form')).
A plugin is installed at the same time of the component where I intervene which allow to add a button in the editing page of article and which control the apparition of a windows created by ExtJs.
So this library is loaded at the same time of this page. I made some test : I removed the javascript code which call ExtJs functions without remove the library, it doesn't work. When I removed all (code and library refering to ExtJs), I can record my article.
All along the development of my application on Joomla, I got this type of error but it never blocked the functionning. Until now ...
I hope somebody can help me, and for that I wish I made myself clear.
(forgive my english, I'm french ... :))
Thank you