Fatal error: Call to undefined method – Joomla 3 Component Development Updated on June 8, 2023 by Brad Markle 0 Minutes, 30 Seconds to Read When creating a Joomla 3 component, you can declare functions / methods within your models. When calling these methods in your views, you might see an error similar to the following: Fatal error: Call to undefined method ComponentViewName::yourMethod() in /home/userna5/public_html/components/com_component/views/component/view.html.php on line 19 This error can be resolved using the getModel method, and this is how you can edit your view.html.php file to do so. Replace this: $this->someMethod(); With this: $model = $this->getModel(); $model->someMethod(); Below, we’ve created a screenshot that shows the getModel method being used: Share this Article Related Articles How to Use the Free Mini Frontpage Extension for Joomla 4.0 How to Change a Joomla 2.5 User’s Email Address How to Configure Joomla 2.5 to Send Email Using SMTP How to Edit a Joomla 3 Template How to install Phoca Gallery for Joomla 2.5 Creating a Menu Item for your Joomla 3 Component Changing Email Settings in Joomla 3.1 Using the Redirect Manager in Joomla 3.1 How to add Bootstrap to a Joomla 3.1 Template How to Use Bootstrap 5.0 Alerts in Joomla 4.0