Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Web application issues after deployment #6282


User avatar
0
deventerprise created

Experiencing two obvious issues when publishing the application live, these do not occur during development.

  1. A CSS file fails to load (metronic-customize.min.css). It seems like a minified version of the origial file is not created. There are two that are trying to get loaded, /Common/Styles/Themes/default/metronic-customize.min.css and /Common/Styles/metronic-customize.min.css
  2. The default dashboard does not load correctly with te JS error in host-dashboard-libs.min.js "Uncaught Error: Invalid dimensions for plot, width = 745.313, height = 0"

These occured in version 6.4 and still after updating to 6.5. Are these known issues?


4 Answer(s)
  • User Avatar
    0
    deventerprise created

    This is the same problem as seen here: https://support.aspnetzero.com/QA/Questions/6194#answer-f37480ee-3374-e2de-e53f-39eb1a9bcef4

    Minified versions of these files don't exist and are not created as part of a production build. Some of the theme files are not empty so you should not remove them.

  • User Avatar
    0
    deventerprise created

    This is a problem with the bundle config that does not minify the customization files: https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/bundleconfig.json

    You need to bundle the base on as well as all the all the themes:

      {
        "outputFileName": "wwwroot/Common/Styles/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/default/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/default/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/blue/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/blue/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/green/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/green/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/pink/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/pink/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/yellow/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/yellow/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/theme2/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/theme2/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/theme3/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/theme3/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/theme7/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/theme7/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/theme8/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/theme8/metronic-customize.css"
        ]
      },
      {
        "outputFileName": "wwwroot/Common/Styles/Themes/theme11/metronic-customize.min.css",
        "inputFiles": [
          "wwwroot/Common/Styles/Themes/theme11/metronic-customize.css"
        ]
      }
    

    And also remove the main customzation from the common-styles.css bundle at the top:

      {
        "outputFileName": "wwwroot/view-resources/Areas/App/Views/_Bundles/common-styles.css",
        "inputFiles": [
          "wwwroot/Common/Styles/**/*.css",
          "wwwroot/fonts/fonts-poppins.css",
          "wwwroot/fonts/fonts-roboto.css",
          "!wwwroot/Common/Styles/**/*.min.css",
          "!wwwroot/Common/Styles/Themes/**/*.css",
          "!wwwroot/Common/Styles/abp-zero-template-rtl.css",
    +    "!wwwroot/Common/Styles/metronic-customize.css*.css",
          "!wwwroot/Common/Styles/metronic-customize-top-menu*.css"
        ]
      },
    

    That just leaves the JS error "Invalid dimensions for plot" on the dashboard to try and resolve.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @deventerprise

    We are not aware of this problem. Could you create an issue on GitHub so we can fix it ?

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team