NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
23 Aug 2020

Pull Request for Issue #30453 .

Summary of Changes

  • Bug fix
  • Remove duplicate bindings

Testing Instructions

  • Download and install the module from @Razzo1987
  • Create a Swiper Slider module
  • Go to "Options" tab
  • Select a Background Image
  • Try to select a different image
  • Remove the image with the X button
  • Try to select an image
  • add more fields and repeat the previous steps

Actual result BEFORE applying this Pull Request

Modal doesn't open as expected

Expected result AFTER applying this Pull Request

Modal opens as expected

Documentation Changes Required

Nope

PS a note here:

  • All Bootstrap init functions need a similar approach, so whenever a Bootstrap component is added programmatically it can be initialised.
  • This is largely unneeded if all the components were custom elements. Custom elements have lifecycle events and therefore the initialisation can happen on the connectedCallback, no extra fuzz, they just work...
26c8b19 23 Aug 2020 avatar dgrammatiko fix
avatar dgrammatiko dgrammatiko - open - 23 Aug 2020
avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2020
Category JavaScript Repository NPM Change
avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
Labels Added: NPM Resource Changed ?
avatar infograf768 infograf768 - test_item - 23 Aug 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 23 Aug 2020

I have tested this item successfully on 79c4e01


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

avatar Razzo1987
Razzo1987 - comment - 23 Aug 2020

Work correctly on the custom module
Work correctly on my module with 2 different image
Do not work on my module with repeatable fields within an image ?

avatar infograf768
infograf768 - comment - 23 Aug 2020

@Razzo1987
Please post here your module zip so that we can test.

avatar Razzo1987
Razzo1987 - comment - 23 Aug 2020

It is in development: 4.zip

you can find a tab "slides". Inside you can find a repeatable filed with images:
image

avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2020
avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2020
avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2020
avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2020

@infograf768 @Razzo1987 please retest using @Razzo1987 's module

5415b9b 23 Aug 2020 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 23 Aug 2020
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2020
b3912bc 23 Aug 2020 avatar dgrammatiko Pffff
avatar Quy
Quy - comment - 23 Aug 2020

Edit Swiper Slider module:

Uncaught TypeError: Joomla.Bootstrap is undefined
joomla-field-media.js:231:11

avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2020

@Quy did you run npm install?

avatar Quy Quy - test_item - 23 Aug 2020 - Tested successfully
avatar Quy
Quy - comment - 23 Aug 2020

I have tested this item successfully on 50a892a


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

avatar Razzo1987
Razzo1987 - comment - 23 Aug 2020

I'm testing with

Joomla! 4.0.0-beta4-dev+pr.30455
These packages were built based on commit 50a892acda4a8d677fe50d02b995c535ddc0e100 included in pull request 30455
These packages were built on Sun Aug 23 16:30:38 UTC 2020

from https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/30455/downloads/34914
and doesn't work

avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2020

@Razzo1987 Just realised that the last commit was not processed, ask someone with Drone access to restart the task

avatar Razzo1987
Razzo1987 - comment - 23 Aug 2020
avatar Quy
Quy - comment - 23 Aug 2020

@Razzo1987 Drone restarted. Please try again.

avatar Razzo1987
Razzo1987 - comment - 23 Aug 2020

Doesn't work

Joomla! 4.0.0-beta4-dev+pr.30455
These packages were built based on commit 50a892acda4a8d677fe50d02b995c535ddc0e100 included in pull request 30455
These packages were built on Sun Aug 23 17:59:30 UTC 2020
avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2020

Doesn't work

Well, the drone was restarted but there is no new zip file (check the time) so basically you've just tested an earlier version of this PR

avatar Quy
Quy - comment - 23 Aug 2020

It is working for me. It includes the latest commit. See:

These packages were built based on commit 50a892a

Please enable Debug System and check the browser's console.

avatar infograf768 infograf768 - test_item - 24 Aug 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 24 Aug 2020

I have tested this item successfully on 50a892a

Works fine.

Question: could this patch have an impact on other modals (xtd)?


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

avatar dgrammatiko
dgrammatiko - comment - 24 Aug 2020

Question: could this patch have an impact on other modals (xtd)?

I doubt it will affect anything, basically what was done here is to expose the init functionality so it can be used by devs whenever adding programmatically modals. This is needed because all the components using the Bootstrap js need initialisation but custom elements don't need that kind of pampering, which for me is an improved DX.

avatar infograf768 infograf768 - change - 24 Aug 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 24 Aug 2020

Trust you. ;) RTC


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

avatar Razzo1987
Razzo1987 - comment - 25 Aug 2020

EDITED!
it's OK!
I have cache problems ?

avatar infograf768 infograf768 - close - 25 Aug 2020
avatar infograf768 infograf768 - merge - 25 Aug 2020
avatar infograf768 infograf768 - change - 25 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-25 09:08:30
Closed_By infograf768
Labels Added: ?
avatar infograf768
infograf768 - comment - 25 Aug 2020

Tks!

avatar Didldu-Florian
Didldu-Florian - comment - 1 Mar 2021

@infograf768 In current BETA Problem still exists: See #26711
and #28953

avatar Didldu-Florian
Didldu-Florian - comment - 2 Mar 2021

@dgrammatiko can you check again?

avatar dgrammatiko
dgrammatiko - comment - 2 Mar 2021

@Didldu-Florian change

&& window.bootstrap.Modal.getInstance(this.modalElement) === undefined) {
to && window.bootstrap.Modal.getInstance(this.modalElement) === null) {

Also if you do a PR please also apply the same fix here:

&& window.bootstrap.Modal.getInstance(this.modal) === undefined) {

avatar Didldu-Florian
Didldu-Florian - comment - 3 Mar 2021

@dgrammatiko oh, nice, thanks :) That fix works.
But why does no PR exists for that?

Add a Comment

Login with GitHub to post a comment