Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
austin1
Partner - Contributor II
Partner - Contributor II

Mashup conflicts with bootstrap

When building a mashup and bringing it into react. I have created a basic react app using create-react-app and was able to fully integrate with qliksense using mashups. However bringing it into my actual product, bootstrap is having conflicts. I have to bring in my own bootstrap for my product and when i try to use qliks require it brings in bootstrap so there are conflicts.

Product is vite frontend

Environment Context: Qliksense Enterprise Nov 2024, behind SSO using OIDC through keycloak.



here is some context for my basic react app:
Index.html:

 

 

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <link rel="stylesheet" href="https://%QLIK_SERVER_IP%/%QLIK_OIDC%/resources/autogenerated/qlik-styles.css">
    <!-- <link rel="stylesheet" href="Examples.css"> -->
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>React App</title>
    <script src="https://%QLIK_SERVER_IP%/%QLIK_OIDC%/resources/assets/external/requirejs/require.js"></script>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    <div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

 

 


Segment of App.js:

 

 

if (typeof window.require === "undefined") {
      console.error("Qlik is not loaded");
      return;
    }

    var config = {
      host: QLIK_SERVER_IP,
      prefix: "/QLIK_SSO/",
      port: "443",
      isSecure: true,
    };
    const baseUrl =
      (config.isSecure ? "https://" : "http://") +
      config.host +
      (config.port ? ":" + config.port : "") +
      config.prefix +
      "resources";
    window.require.config({
      baseUrl: baseUrl,
    });

    console.log("base url", baseUrl);

    window.require(["js/qlik"], function (qlik) {
      console.log("qlik library loaded", qlik);

      var appDS = qlik.openApp(APP_ID, config);
}

 

 


 Then here is when i am importing into my product:
index html:

 

 

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<link rel="stylesheet" href="../assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="../assets/css/line-awesome.min.css">
	<link rel="stylesheet" href="../assets/css/main.css">
	<link rel="stylesheet" href="https://%QLIK_SERVER_IP%/%QLIK_SSO%/resources/autogenerated/qlik-styles.css">

	<style>
		#table-card {
			height: 48vh;
			overflow-y: auto;
		}
	</style>
	<script src="https://%QLIK_SERVER_IP%/%QLIK_SSO%/resources/assets/external/requirejs/require.js"></script>
	<script src="../assets/js/bootstrap.bundle.min.js"></script> 
	<script src="../assets/js/main.js"></script>
	<script src="../assets/js/qlik-setup.js"></script>
</head>

 

 

 

The app.js is the same as my dev environment. The error occurs when i try to do the window.require.config({}).


Some ideas or solutions i would love some help with:

Is it possible to override qlik's bootstrap (it could break things but that can be handled in our product)

is it possible to have qliks visualizations be separated out using different bootstraps?

is it possible to make my qlik a deliverable and have it be separated out similar to the previous question?

im trying to avoid any iframe usage

 

Any other information needed and i can give it.

Labels (5)
1 Reply
austin1
Partner - Contributor II
Partner - Contributor II
Author

Finding this and implementing it https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/Mashups/Content/Sense_Mashups/Ho...

but it seems like vite doesnt function like angular or react because im still getting the error