Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW: add const to not include default lib_head.js in top_htmlhead with DISABLE_LIB_HEAD_JS #32976

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

FHenry
Copy link
Member

@FHenry FHenry commented Feb 7, 2025

fix: #32975

When custom module add page, it would be nice to not always include lib_head.js (may be confilct with other UI js lib in module)

@@ -2216,7 +2216,9 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr

// Global js function
print '<!-- Includes JS of Dolibarr -->'."\n";
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&amp;'.$ext : '').'"></script>'."\n";
if (!defined('DISABLE_LIB_HEAD_JS')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you disable this lib, all the rest of application will hang due to js error.
What is the goal of disabling it. As it is just js function, you should not experience conflict ?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing only "disable lib_head" on main.inc.php - Add variable DISABLE_LIB_HEAD
2 participants