Skip to content

web: change URL of jquery .js file - #7425

Closed
davidpanderson wants to merge 1 commit into
masterfrom
dpa_jquery_url2
Closed

davidpanderson wants to merge 1 commit into
masterfrom
dpa_jquery_url2

Conversation

@davidpanderson

@davidpanderson davidpanderson commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
  • use current version (4.0.0)
  • include integrity checksum
  • let project.inc override it

Summary by cubic

Updates the jQuery reference to 4.0.0 with an integrity checksum, and lets projects override it via project.inc.

  • Replaces the JQUERY_URL constant with JQUERY_REF, which now embeds the full script tag attributes (src, integrity, crossorigin).
  • The default points to the non-minified slim build; defining JQUERY_REF in project.inc before the auto-set overrides the default.

Written for commit 6818491. Summary will update on new commits.

View guided diff Turn on auto-fix

- use current version (4.0.0)
- include integrity checksum
- let project.inc override it

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="html/inc/util.inc">

<violation number="1" location="html/inc/util.inc:57">
P2: `JQUERY_REF` cannot be overridden from the usual later part of `project.inc` when a page requires `project.inc` directly, because `project.inc` loads `util.inc` before reaching that definition. Load the override before `util.inc` or change the initialization order so all project entry paths honor it.</violation>

<violation number="2" location="html/inc/util.inc:59">
P3: The default now loads the unminified jQuery build on every page, replacing the existing `.slim.min.js` and adding avoidable transfer and parse cost for all users. Use `jquery-4.0.0.slim.min.js` with its matching integrity hash.</violation>
</file>

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread html/inc/util.inc
} else {
date_default_timezone_set('UTC');
}
if (!defined('JQUERY_REF')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: JQUERY_REF cannot be overridden from the usual later part of project.inc when a page requires project.inc directly, because project.inc loads util.inc before reaching that definition. Load the override before util.inc or change the initialization order so all project entry paths honor it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At html/inc/util.inc, line 57:

<comment>`JQUERY_REF` cannot be overridden from the usual later part of `project.inc` when a page requires `project.inc` directly, because `project.inc` loads `util.inc` before reaching that definition. Load the override before `util.inc` or change the initialization order so all project entry paths honor it.</comment>

<file context>
@@ -56,6 +54,13 @@ if (defined('TIMEZONE')) {
 } else {
     date_default_timezone_set('UTC');
 }
+if (!defined('JQUERY_REF')) {
+    define('JQUERY_REF',
+'src="https://code.jquery.com/jquery-4.0.0.slim.js"
</file context>

Comment thread html/inc/util.inc
}
if (!defined('JQUERY_REF')) {
define('JQUERY_REF',
'src="https://code.jquery.com/jquery-4.0.0.slim.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3: The default now loads the unminified jQuery build on every page, replacing the existing .slim.min.js and adding avoidable transfer and parse cost for all users. Use jquery-4.0.0.slim.min.js with its matching integrity hash.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At html/inc/util.inc, line 59:

<comment>The default now loads the unminified jQuery build on every page, replacing the existing `.slim.min.js` and adding avoidable transfer and parse cost for all users. Use `jquery-4.0.0.slim.min.js` with its matching integrity hash.</comment>

<file context>
@@ -56,6 +54,13 @@ if (defined('TIMEZONE')) {
 }
+if (!defined('JQUERY_REF')) {
+    define('JQUERY_REF',
+'src="https://code.jquery.com/jquery-4.0.0.slim.js"
+integrity="sha256-M+GjhMBfXikM1izMplICCTscIj5hzPCp6uDzaypxtgg="
+crossorigin="anonymous"'
</file context>

@davidpanderson
davidpanderson deleted the dpa_jquery_url2 branch November 9, 2026 09:38
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.

1 participant