? ? Pending

User tests: Successful: Unsuccessful:

avatar continga
continga
21 Oct 2018

Pull request for Issue #22441 (and also #22690 ) - see those issues for testing instructions.

Summary of changes

We were incorrectly using the lastRowNum property inside of the subformRepeatable object due to
legacy reasons (the logic using a lastRowNum property has been overtaken from history, see commit
f2a9874 ).

What happened is that we always were incrementing the lastRowNum property by 1 inside of the
fixUniqueAttributes method, whilest we call that method multiple times recursively, when we have
nested subforms. So having a 2-level subform meant we would increment the lastRowNum twice for every
added row, effectively meaning we would skip certain indices and hence totally lose the connection
between the actual count of existing rows and their index. Actually we do not need the lastRowNum
property, as the current logic works well without it just by calculating the count of rows directly
in the addRow method. So removing the lastRowNum property is the best solution.

@gaelicwinter and @dawe78 can you please this PR? Thanks!

avatar continga continga - open - 21 Oct 2018
avatar continga continga - change - 21 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Oct 2018
Category JavaScript
avatar continga continga - change - 21 Oct 2018
Labels Added: ?
avatar gaelicwinter gaelicwinter - test_item - 22 Oct 2018 - Tested successfully
avatar gaelicwinter
gaelicwinter - comment - 22 Oct 2018

I have tested this successfully but I get the message Bad Credentials when I try to mark the test result. However, it looks like it updated the test result anyways.

avatar gaelicwinter
gaelicwinter - comment - 22 Oct 2018

I have tested this successfully but I get the message Bad Credentials when I try to mark the test result. However, it looks like it updated the test result anyways.

avatar dawe78 dawe78 - test_item - 22 Oct 2018 - Tested successfully
avatar Quy Quy - change - 2 Nov 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 2 Nov 2018

RTC


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

avatar mbabker mbabker - close - 5 Nov 2018
avatar mbabker mbabker - merge - 5 Nov 2018
avatar mbabker mbabker - change - 5 Nov 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-11-05 23:19:18
Closed_By mbabker
Labels Added: ?

Add a Comment

Login with GitHub to post a comment