0

I've started to make my own custom component following a cookbook for joomla in making a component. All are ok but when i tried to edit an existing data it automatically add again a new data same as the data edited. What is the problem with this? really need help here. Sorry for my bad english.. thank you.

rjx44
  • 389
  • 2
  • 9
  • 16

1 Answers1

0

I got the same error and spent hours to figure out the issue. However, at last I noticed that I have the equal sign (=) missing in my form action URL.

Previously it was like this;

<form action="<?php echo JRoute::_('index.php?option=com_mycomponent&layout=edit&id' . (int) $this->item->id); ?>" method="post" name="adminForm" id="section-form">

So I changed it to;

<form action="<?php echo JRoute::_('index.php?option=com_mycomponent&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="section-form">

Note the missing (=) next to the id parameter on the URL.

Saranga A
  • 1,091
  • 16
  • 22