php - Joomla Custom Component - Error loading form file -


currently, i've been trying familiar programming custom components joomla 3.4.8. therefore i've installed new joomla website on raspberry pi 2 test purposes. working schould.

then started 'developing mvc component' tutorial provided joomla itself. worked fine until point 7 'using database'.

although point talks database, problem field types work. i.e. when want add new menu item (in administrator part), , select custom menu item type, error states "error loading form file".

i've been trying find error several days, without success. went far track code line inside joomla framework throws error. code line inside /libraries/legacy/model/form.php (line 192). @ line can see $this->preprocessform($form, $data);. somehow code not enter method, throws exception.

i compared $form , $data variable ones normal run adding following statement (found here) before line 192:

 echo "<pre>"; print_r($arr); echo "</pre>";  

the $form variables not have difference. $data variables different. unfortunately i'm pretty new these concepts, don't know wrong or search problem.

hopefully, of can me out...

for completion here output of $data variable when error triggered:

    array (     [parent_id] => 1     [level] =>      [lft] =>      [rgt] =>      [alias] =>      [id] =>      [menutype] => mainmenu     [title] =>      [note] =>      [path] =>      [link] => index.php?option=com_helloworld&view=helloworld     [type] => component     [published] =>      [component_id] => 10000     [checked_out] =>      [checked_out_time] =>      [browsernav] => 0     [access] =>      [img] =>      [template_style_id] => 0     [params] => array         (             [menu-anchor_title] =>              [menu-anchor_css] =>              [menu_image] =>              [menu_text] => 1             [page_title] =>              [show_page_heading] =>              [page_heading] =>              [pageclass_sfx] =>              [menu-meta_description] =>              [menu-meta_keywords] =>              [robots] =>              [secure] => 0         )     [home] => 0     [language] =>      [client_id] =>      [request] => array         (             [option] => com_helloworld             [view] => helloworld         )     [menuordering] => 0     [toggle_modules] => 1 ) 

okay! solved issue. unfortunately stupid mistake...

first of noticed method preprocessform($form, $data) had been overwritten subclass. hence echo statements wouldn't executed. brought me down point xml file @ <joomla-root>/components/com_helloworld/views/helloworld/tmpl/default.xml loaded.

unfortunately didn't work. , due minor mistake in xml file. mistake simple , stupid:

<fieldset name="request">         <field             name="id"             type="helloworld"             label="com_helloworld_helloworld_field_greeting_label"             description="com_helloworld_helloworld_field_greeting_desc"              />         </field> </fieldset> 

i closed field tag twice, second closing tag used in previous step of tutorial.

very stupid mistake cost me several hours. @ least had insights joomla code. post avoids others searching countless hours such minor mistake.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -