fix: remote destinations tab broken (Add Destination + stuck loading) #208
Reference in New Issue
Block a user
Delete Branch "fix/remote-destinations-modal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
On the profile editor's Remote tab (reported on suite.dev):
Root cause
Both symptoms share one cause. The
DOMContentLoadedhandler intmpl/profile/edit.phpinstantiated the Bootstrap modal eagerly near the top:In Joomla 6, Bootstrap ships as a deferred ES module, so
window.bootstrapis not defined yet when this inline script runs atDOMContentLoaded. The reference throws aReferenceErrorthat aborts the entire handler — soloadRemotes()is never called (table stays "Loading…") and the Add Destination click listener is never bound (button dead).The purge and stepped-backup modals were unaffected because they resolve
bootstrap.Modallazily inside their click handlers (by which time the module has loaded).Fix
getModal()at click-time, matching the working modals — so the table load and button binding no longer depend on Bootstrap being ready atDOMContentLoaded.bootstrap.modalweb asset sowindow.bootstrap.Modalis registered.Test plan
3ef36fd41eto4ca9e23630