English Support Forum

icon
Avatar
The_Anomaly
Posts: 6
ME 1.6.0
Joomla 1.5.14

Editing an object and then saving results in a new property / object as opposed to just saving the changes.

:thumbdown:
17.10.2009 11:44
Avatar
admin
Moderator
Posts: 887
Hi,

please update to ME 1.6.1 - it´s fixed there.

best regards
17.10.2009 13:03
Avatar
The_Anomaly
Posts: 6
Download area says for subscribers only. I'm not paying again for silly bugs like this. Sorry. It was only 4 lines of code that needed changing! You need to make provision for this kind of scenario as its a blatant problem in a "stable" release. Below is the fix for those who can't afford to keep paying euro's...

Fixed it myself. Clearly a bug!

In the user.misterestate.php file under the function editObject is a line that creates the $action which is the name of the page that gets displayed eg: "Edit Object" / "New Object" etc... This line was also creating the ID for the record being edited eg:

iconjavascript:
<input type="hidden" name="id" id="id" value="48" />


Trouble is this line is OUTSIDE the form and has no effect causing the saved object to be viewed as a new object!

To fix this I opened user.misterestate.html.php and under the function editObjects I looked for where the form builds and placed this code:

iconphp:
<?php if ($task != 'new') {
	echo '<input type="hidden" name="id" id="id" value="'.$obj->id.'" />';
}?>


Now my records save properly.

:thumbup:
17.10.2009 13:11
icon