Closed ppazos closed 1 year ago
Be sure to check the dependencies https://bootstrap-confirmation.js.org/#installation (BT 5 is not supported)
If you don't use the full bootstrap bundle you need to include popover.js
@mistic100 UPDATE: In the examples, it uses Bootstrap 3 which included popover inside, so this doesn't work with bootstrap 4 that doesn't include that.
I'm using BS4
BTW, I already checked the dependencies, if you go to a CDN and look for popper you will see there is no "popover" element there. See for yourself: https://cdnjs.com/libraries/popper.js/1.16.1
Included the library and there is no definition of
popover
inside, it'spopper
Popover is part of Bootstrap https://getbootstrap.com/docs/4.1/components/popovers/
https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.js (search popover)
@mistic100 let me check
Though in your dependencies you have:
"peerDependencies": {
"bootstrap": "^4.0.0",
"jquery": "1.9.1 - 3",
"popper.js": "^1.16.1" <<<<< see?
}
Why do you insist ons showing me popper ? Popper and Popover are not the same thing, and Popover is part of Bootstrap.
I think you use the wrong version of Confirmation, because the error message you quote has changed https://github.com/mistic100/Bootstrap-Confirmation/blob/master/src/popover.js#L5 you must use version 4.2.1 not 2.4.4
@mistic100 not insisting, just mentioned that is actually in your package.json file...
https://github.com/mistic100/Bootstrap-Confirmation/blob/master/package.json#L31
Maybe it shouldn't?
I have updated the bootstrap file, I'm getting a different error now.
you will have to setup a live demo of your setup because here I can't do anything for you
and with unminified files
I know what's the problem, I had an old bootstrap-confirmation version on the project, just updated to a newer one and the error mentioned above went away, also the confirm worked as expected. Thanks.
Yeah that's what I said above
I think you use the wrong version of Confirmation, because the error message you quote has changed https://github.com/mistic100/Bootstrap-Confirmation/blob/master/src/popover.js#L5 you must use version 4.2.1 not 2.4.4
Included the library and there is no definition of popover inside, it's popper
But bootstrap-confirmation looks for 'popover':
if(!$.fn.popover)throw new Error("Confirmation requires popover.js");
In the examples, it uses Bootstrap 3 which included popover inside, so this doesn't work with bootstrap 4 that doesn't include that.