daloradius icon indicating copy to clipboard operation
daloradius copied to clipboard

Not possible to update attributes - fix included

Open kimhaak opened this issue 11 months ago • 2 comments

Hi,

mng-rad-profiles-edit.php line 243 resets the counter to keep the html fields unique. This results in a conflict and it is not possible to update the fields, if there are both a check and reply in the profile. Attribute number three in either check or reply, is editable.

Fix is to remove line 243 //$editCounter = 0; and let all fields get unique values, regardless if it is check or reply.

I have not checked if this error is present other places.

kimhaak avatar Mar 25 '24 13:03 kimhaak

Thanks for the bug report and suggested fix @kimhaak. Simply removing the counter from the logic in the HTML fields is enough, though?

It seems to be used to create a unique array value:

                $name = sprintf('editValues%s[]', $editCounter);

Can you confirm if removing the $editCounter doesn't break anything?

lirantal avatar Mar 30 '24 07:03 lirantal

@kimhaak , this isn't the correct way to fix it. However, I managed to find a solution on my own. Try cloning (or pulling) a more recent version of daloRADIUS.

filippolauria avatar Apr 18 '24 15:04 filippolauria