{"record":{"id":"ef440a69231b7750","repo":"apache/hadoop","slug":"bootstrap-s-javascript-requires-jquery-version-1-9","errorCode":null,"errorMessage":"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4","messagePattern":"Bootstrap's JavaScript requires jQuery version 1\\.9\\.1 or higher, but lower than version 4","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.4.1/js/bootstrap.js","lineNumber":15,"sourceCode":"/*!\n * Bootstrap v3.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under the MIT license\n */\n\nif (typeof jQuery === 'undefined') {\n  throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n  'use strict';\n  var version = $.fn.jquery.split(' ')[0].split('.')\n  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {\n    throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')\n  }\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.4.1/js/bootstrap.js#L1-L33","documentation":"After the jQuery-exists guard, bootstrap.js 3.4.1 string-parses $.fn.jquery and enforces >= 1.9.1 and < 4: the check (major<2 && minor<9) || (1.9.x with patch<1) || (major>3) throws Error(\"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4\"). Bootstrap 3 relies on jQuery APIs removed in 4 and absent before 1.9.1.","triggerScenarios":"The page loads jQuery 1.8.x or older, or jQuery 4.x, together with bootstrap.js 3.4.1 — the version comparison is lexicographic per component, so any out-of-range release triggers the throw at script evaluation time.","commonSituations":"Upgrading the jQuery bundled in web UIs past 3.x while keeping Bootstrap 3; legacy pages pinned to jQuery 1.7/1.8; a second, older jQuery loaded late overwriting window.jQuery/$.fn.jquery.","solutions":["Pin jQuery to a 1.9.1-3.x release (e.g. the 1.12.x/3.x shipped alongside the HDFS webapps)","If jQuery 4 is required, upgrade the UI to Bootstrap 5, which dropped the jQuery dependency","Verify only one jQuery version loads (a late-loading old copy can overwrite $.fn.jquery)"],"exampleFix":"<!-- before -->\n<script src=\"https://code.jquery.com/jquery-4.0.0.min.js\"></script>\n<script src=\"/static/bootstrap-3.4.1/js/bootstrap.js\"></script>\n\n<!-- after -->\n<script src=\"/static/jquery-3.6.0.min.js\"></script>\n<script src=\"/static/bootstrap-3.4.1/js/bootstrap.js\"></script>","handlingStrategy":"validation","validationCode":"function jqueryInRange() {\n  var v = window.jQuery && $.fn.jquery.split('.').map(Number);\n  return !!v && (v[0] > 1 || (v[0] === 1 && (v[1] > 9 || (v[1] === 9 && v[2] >= 1)))) && v[0] <= 3;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the jQuery version shipped with the web UI (1.12.x/3.x)","Test pages after any jQuery upgrade alongside Bootstrap 3.4.1","Ensure exactly one jQuery loads; late old copies overwrite $.fn.jquery"],"tags":["javascript","bootstrap","jquery","version-mismatch","hdfs-web-ui"],"backgroundTag":"javascript-library-version-mismatch","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}