J3 Issue
avatar dawe78
dawe78
2 Aug 2019

Steps to reproduce the issue

Form:
Create main form with subform; Add Modal window field (custom) to subform.
Backend:
Click add subform. Click "select" on modal field

Expected result

  • open modal window
  • load iframe, display list of items

Actual result

  • open modal window
  • empty content

System information (as much as possible)

PHP 7.2.9 on IIS 8.5
Joomla 3.9.10

Additional comments

Found the possible solution in /layouts/joomla/modal/main.php, Line 86:
$script[] = " $('#" . $selector . "').on('show.bs.modal', function() {";

-->improper jQuery call for JS-added elements, so it will not be called on subform rows; should be:
$script[] = " $(this).on('show.bs.modal', '#" . $selector . "', function() {";

This solutions is almost working for me, just needed to fix another problem on line 120:
$script[] = " padding = document.getElementById('" . $selector . "').offsetTop,";

This throws an error document.getElementById() is null; I changed this code to the jQuery equialent:
$script[] = " padding = $('#" . $selector . "').offsetTop,";

Now its perfect working for me. Maybe this simple changes can be done for next release.

avatar dawe78 dawe78 - open - 2 Aug 2019
avatar brianteeman
brianteeman - comment - 26 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar alikon alikon - change - 27 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-27 04:42:39
Closed_By alikon
avatar alikon alikon - close - 27 Aug 2022

Add a Comment

Login with GitHub to post a comment