Skip to content

Manager UI breaks when CDN assets are unavailable; gallery modal overlays the page and image-library button does not work #18

@another-brick-in-the-wall

Description

Description:
After installing seiger/sGallery, the gallery tab in the Evolution CMS manager causes two separate issues:

  1. The module loads Tailwind, Alertify, and Sortable from external CDN URLs.
  2. The “Image Library” button is wired to a label, but BrowseServer() in Evolution CMS writes the selected file path into an input.

When the CDN assets are not available, the gallery modal styling breaks: the hidden state is not applied correctly and the modal becomes a large black overlay covering the manager UI. In addition, the JavaScript can fail because Sortable and/or alertify are undefined.

The second issue is that choosing a file from the built-in Evolution file browser does not reach the gallery upload handler, because BrowseServer() expects a real input field, not a label element. As a result, selecting an image from the library does nothing.

What I observed:

  • The gallery tab layout becomes broken.
  • A large black modal overlay appears over the manager.
  • The JS may stop working if CDN scripts fail to load.
  • Clicking “Бібліотека зображень” does not correctly pass the selected file into the gallery.
  • The browser selection does not trigger doEvoLibrary() as expected.

Expected behavior:

  • The gallery should work without external CDN dependencies.
  • The modal should stay hidden until explicitly opened.
  • Missing third-party scripts should not break the entire manager UI.
  • The “Image Library” button should correctly open the Evolution browser and send the selected file path into the gallery handler.
  • Selecting a file from the library should add the file to the gallery.

Actual behavior:

  • The gallery depends on external CDN resources for styling and JS.
  • When CDN resources are unavailable, the modal overlay breaks the page layout.
  • Sortable and alertify can fail to load, which breaks interactivity.
  • The “Бібліотека зображень” control does not behave like a proper input target, so file selection is not handled correctly.

Steps to reproduce:

  1. Install seiger/sGallery.
  2. Open a resource that contains the gallery tab.
  3. Disconnect or block access to the CDN resources used by the plugin.
  4. Open the gallery tab or trigger the modal.
  5. Observe that the modal overlay covers the manager and the UI becomes broken.
  6. Click “Бібліотека зображень”.
  7. Choose a file in the Evolution browser.
  8. Observe that the chosen file does not get passed into the gallery flow correctly.

Suggested fix:

  • Remove the hard dependency on CDN-hosted Tailwind, Alertify, and Sortable.
  • Bundle or locally ship required assets with the plugin.
  • Add safe fallbacks if Sortable or alertify are missing.
  • Make the “Image Library” control target a real input element instead of a label.
  • Ensure BrowseServer() writes the selected file path into an actual hidden input that triggers doEvoLibrary().
  • Prevent the modal from becoming visible if the required CSS/JS is not loaded.

Screenshots:

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions