2

i follow series "Developing an MVC Component" on https://docs.joomla.org/J3.x:Developing_an_MVC_Component, but when i click to publish button, i have an error "Fatal error: Call to undefined method JmsMessagesModelMessages::publish() in E:\xampp\htdocs\joomla37\libraries\legacy\controller\admin.php on line 210". Somebody help me. I using joomla 3.7.5. Thanks.

1

Check the $name and $prefix variables that are passing over getModel function on your controller.

$name = NAME_OF_YOUR_EDIT_VIEW
$prefix = COMPONENT_NAME + Model

1

"Fatal error: Call to undefined method JmsMessagesModelMessages::publish() in E:\xampp\htdocs\joomla37\libraries\legacy\controller\admin.php on line 210"

Like the error says, you don't have implemented a publish() function in your model.

Make one that changes the state for the column like you want on the database and it will work.

  • @NotToday You're welcome :D – troyKoutei Sep 26 '17 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.