#7863 Web UI plugin path gets mangled
Closed: worksforme 5 years ago by rcritten. Opened 5 years ago by jlanclos.

Issue

When using a Web UI plugin under ipa/ui/js/plugins, the browser fails to load because path requested by UI is incorrect.
This happens for at least freeipa 4.5.4 and 4.6.4

Steps to Reproduce

  1. cd /usr/share/ipa/ui/js/plugins
  2. touch test.js
  3. tail -f /var/log/httpd/access_log
  4. Refresh Web UI

Actual behavior

Refresh of Web UI results in blank page.
http log shows: "GET /ipa/ui/test.js/test.js?40504 HTTP/1.1" 404 220"

Expected behavior

Plugin should be loaded from correct path of /ipa/ui/js/plugins/test.js not /ipa/ui/test.js/test.js

Version/Release/Distribution

Happens with multiple versions:

ipa-server-4.5.4-10.el7.centos.4.4.x86_64
ipa-client-4.5.4-10.el7.centos.4.4.x86_64
389-ds-base-1.3.7.5-28.el7_5.x86_64
pki-ca-10.5.1-15.el7_5.noarch
krb5-server-1.15.1-19.el7.x86_64

and

ipa-server-4.6.4-10.el7.centos.2.x86_64
ipa-client-4.6.4-10.el7.centos.2.x86_64
389-ds-base-1.3.8.4-22.el7_6.x86_64
pki-ca-10.5.9-6.el7.noarch
krb5-server-1.15.1-8.el7.x86_64


Please don't put a plugin's javascript file directly under /usr/share/ipa/ui/js/plugins. Please use a directory under that path and then put it there.

We don't have good documentation for web UI plugins but this is actually a requirement: your plugin is expected to have content under /usr/share/ipa/ui/js/plugins/<pluginname> and at least one file has to be named /usr/share/ipa/ui/js/plugins/<pluginname>/<pluginname>.js.

Metadata Update from @rcritten:
- Issue close_status updated to: worksforme
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata