?
avatar BurtNL
BurtNL
10 Nov 2018

Steps to reproduce the issue

Create a subform in backend of your website, see screenshot below.
Click on + button > not working, no message, nothing.

Expected result

Clicking on the + button should add entry to form.

Actual result

Nothing happens when clicking on + button, should add row to form.

System information (as much as possible)

Joomla 3.9.0, updated from 3.8.13 (where this was still working).

Additional comments

See screenshot:

  • button does nothing
  • button still works properly

screen shot 2018-11-10 at 02 17 14

avatar BurtNL BurtNL - open - 10 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Nov 2018
avatar roland-d
roland-d - comment - 10 Nov 2018

@BurtNL This issue is caused by this commit https://github.com/joomla/joomla-cms/pull/17552/files#diff-43fc98bd347d2aeaa1b1628c8fb0829b

I am going to assume you have an override of the repeatable-table.php file. The mentioned commit created a B/C break.

The only solution there is, you have to update your override. Here is the code change from my extension:
image

Notice, we add the -1 everywhere because the new subforms require a unique number per instance of the form.

Here is the second change we had to do:
image

The tbody must be changed as well:
image

You must pass the unique ID as well to the $this->sublayout() function:
image

Finally you need to replace the script code with a template:
image

Finally you also need to update the section-by-fieldsets.php file with the following changes:
image

Notice we are also adding the -1 here.

Apologies for the screenprints but I think they are clearer than writing the text. You can contact me if you want the actual code.

avatar BurtNL
BurtNL - comment - 10 Nov 2018

@roland-d I was indeed using an overwrite of the repeatable-table.php and 2 other files: section.php and section-byfieldsets.php.
Those files had become outdated and were slightly different from the current files in /layouts/joomla/form/field/subform-files.
So I replaced the 3 outdated files with the new files as mentioned before. And the subforms are working properly again.

Thanks for your screenshots, which pointed me in the right direction, much appreciated!

Also, the subforms seems to work just fine, my issue was caused by some outdated overwrites.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23022.
avatar roland-d roland-d - change - 10 Nov 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-11-10 11:14:21
Closed_By roland-d
avatar roland-d roland-d - close - 10 Nov 2018

Add a Comment

Login with GitHub to post a comment