Skip to content

Move static resources to the public directory#125

Merged
Rom1-B merged 1 commit intopluginsGLPI:mainfrom
giroletm:dev/giroletm
Apr 27, 2026
Merged

Move static resources to the public directory#125
Rom1-B merged 1 commit intopluginsGLPI:mainfrom
giroletm:dev/giroletm

Conversation

@giroletm
Copy link
Copy Markdown
Contributor

Starting GLPI 11.0.0, static resources for plugins must be placed in the public directory.

The resources pointed by the Hooks::ADD_JAVASCRIPT, Hooks::ADD_CSS, Hooks::ADD_CSS_ANONYMOUS_PAGE, Hooks::ADD_JAVASCRIPT_MODULE_ANONYMOUS_PAGE and Hooks::ADD_JAVASCRIPT_ANONYMOUS_PAGE are static resources and are therefore affected by this change.

As a result, loading the example plugin in its current state in the latest version of GLPI (11.0.6 as of writing) results in the requests that try to fetch its CSS and JS files to return a 404.

This PR moves these files in the public folder in order to fix it.

@Rom1-B Rom1-B requested review from Rom1-B and stonebuzz April 24, 2026 11:06
@Rom1-B Rom1-B merged commit 4b67e09 into pluginsGLPI:main Apr 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants