?
avatar mggcodes
mggcodes
8 Jan 2020

Steps to reproduce the issue

  • login to administrator
  • edit an existing item with a repeatable subform (the subform should have more then 1 entry already)
  • delete the first entry of the repeatable
  • add a new entry to the repeatable
  • save the item

Expected result

at the function JModelAdmin::save($data)

all entries of the subform should be in the $data object

$data['subform']['1']
$data['subform']['2']

example code in Editform:

<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1">
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates2" data-new="true">

Actual result

at the function JModelAdmin::save($data)

the entry you added get the same id like the existing entry. So the new one will override the existing one.

$data['subform']['1']

example code in Editform:

<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1">
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1" data-new="true">

System information (as much as possible)

Joomla Version 3.9.X (tested on 3.9.12 and 3.9.14)

Additional comments

avatar mggcodes mggcodes - open - 8 Jan 2020
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2020
avatar richard67
richard67 - comment - 8 Jan 2020

Should be already solved with PR #27334 . @mggcodes Please check, and if solved close this issue.

avatar Fedik
Fedik - comment - 8 Jan 2020

yeah, that the same as #27307
the fix (#27334) will be available in 3.9.15

avatar joomla-cms-bot joomla-cms-bot - close - 8 Jan 2020
avatar alikon alikon - change - 8 Jan 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-01-08 11:47:58
Closed_By alikon
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2020
Closed_By alikon joomla-cms-bot
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Jan 2020

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/27435

avatar alikon
alikon - comment - 8 Jan 2020

we already have a fix and will be available in 3.9.15


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27435.

Add a Comment

Login with GitHub to post a comment