{"record":{"id":"79b21855ec041a05","repo":"apache/hadoop","slug":"popover-requires-tooltip-js","errorCode":null,"errorMessage":"Popover requires tooltip.js","messagePattern":"Popover requires tooltip\\.js","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":1983,"sourceCode":" * Bootstrap: popover.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#popovers\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  // POPOVER PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Popover = function (element, options) {\n    this.init('popover', element, options)\n  }\n\n  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n  Popover.VERSION  = '3.4.1'\n\n  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n    placement: 'right',\n    trigger: 'click',\n    content: '',\n    template: '<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n  })\n\n\n  // NOTE: POPOVER EXTENDS tooltip.js\n  // ================================\n\n  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n  Popover.prototype.constructor = Popover\n","sourceCodeStart":1965,"sourceCodeEnd":2001,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.4.1/js/bootstrap.js#L1965-L2001","documentation":"The Popover plugin in bootstrap.js extends the Tooltip plugin ($.fn.tooltip.Constructor). Right after defining Popover it checks if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') — popover's init delegates to Tooltip.prototype.init and reads $.fn.tooltip.Constructor.DEFAULTS, so tooltip.js must already have registered itself on $.fn.","triggerScenarios":"Using a custom Bootstrap build where popover.js is included but tooltip.js is missing or loads later; referencing individually downloaded plugin files instead of the full bootstrap.js bundle, in the wrong order.","commonSituations":"Custom web UI builds that cherry-pick plugins; asset pipelines concatenating files in the wrong order; bundlers/tree-shakers dropping tooltip.js because no direct import references it.","solutions":["Load the full bootstrap.js bundle, which embeds tooltip.js before popover.js","Or include individual plugin files in dependency order: transition.js, tooltip.js, then popover.js"],"exampleFix":"<!-- before -->\n<script src=\"popover.js\"></script>\n<script src=\"tooltip.js\"></script>\n\n<!-- after -->\n<script src=\"tooltip.js\"></script>\n<script src=\"popover.js\"></script>","handlingStrategy":"validation","validationCode":"if (!$.fn.tooltip) {\n  // tooltip.js missing: load it (or the full bundle) before using popovers\n  throw new Error('load tooltip.js before popover.js');\n}","typeGuard":"function popoverAvailable() {\n  return typeof window.jQuery !== 'undefined' && !!$.fn.tooltip;\n}","tryCatchPattern":null,"preventionTips":["Prefer the full bootstrap.js bundle over cherry-picked plugin files","When using individual files, order them: transition, tooltip, popover","Watch bundler/tree-shaking configs that drop 'unused' tooltip.js"],"tags":["javascript","bootstrap","popover","tooltip","script-order"],"backgroundTag":"javascript-dependency-not-loaded","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}