CRM-12099 Problem loading jstree css

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.8
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      The type of this CSS file is causing an error as seen attached in the screenshot. This causes the navigation menu to render without arrows and it is difficult to use.

        Attachments

        1. css-error.png
          83 kB
          Stoob
        2. css-load.png
          220 kB
          Stoob

          Activity

          [CRM-12099] Problem loading jstree css
          David Greenberg added a comment -

          Not sure if it's related, but the visual representation of the jstree in Stoob's screenshot looks like what we're seeing on CiviCRM.org at http://civicrm.org/civicrm/admin/menu?reset=1

          Note that visiting the above link seems to kill the session / logs you out as well - but I don't see errors in the console

          Donald A. Lobo added a comment -


          note that css / js mime types are sent either by the server or guessed by the browser for most default file types

          Stoob added a comment -

          I realize that. Maybe the issue is then why does this URL: http://www.upstreampublichealth.org/civicrm/admin/themes/default/style.css resolve as an HTML page when logged in and as an 'access denied' when not logged in?

          Maybe cause it is actually an HTML page, not css?

          Stoob added a comment -

          This is another d7/4.2.8 site you can see the URL: http://vestibular.org/civicrm/admin/themes/default/style.css will resolve as a webpage

          also resolves as apparently an HTML page. For whatever reason, it doesn't show an error in console.

          Donald A. Lobo added a comment -

          ahh, that might be a clue

          http://civicrm.org/themes/default/style.css does not exists, throws a 404 and gives login page

          http://civicrm.org/themes/garland/style.css - does exist

          seems like jsTree has some hardcoded and/or wrong paths that it tries to get stuff from which messes things up downstream (why i'm not exactly sure)

          Donald A. Lobo added a comment -

          from the source code of the jsTree package

          if(!theme_name)

          { return false; }

          if(!theme_url)

          { theme_url = $.jstree._themes + theme_name + '/style.css'; }

          so i suspect some initialization stuff etc

          Coleman Watts added a comment -

          While I can see the problem on our own civicrm.org install, I can't manage to reproduce this on my own localhost in 4.2 or 4.3, nor does it reproduce on the public sandbox or demo sites... Makes it kind of hard to fix. Anyone know how I might reproduce?

          Stoob added a comment -

          Try the Seven theme. Then Bartik. If that doesn't work ill give you logins to the site

          Stoob added a comment -

          Also try turning Drupal has compression on and off. In Performance settings

          Coleman Watts added a comment -

          Ah, that was it. Turning on JS aggregation triggers the bug. Makes sense because that changes the location of the jstree code and so relative urls would no longer work. I'll investigate.

          Coleman Watts added a comment -

          Needed to specify the location of jstree's css explicitly since the path changes during drupal's js aggregation.
          While I was at it, applied what we learned in the profile editor work to make the menu editor look less funky.

          Stoob added a comment -

          Thabks! FYI probably a good idea to run test environments including the demo siteim JS compression mode. This is because most production sites run in JS compression mode because of performance issues and also the 32 file IE9 and below bug

          Stoob added a comment -

          FYI These drush commands can turn on/off JS and CSS performance settings easily on the demo site (and elsewhere) when upgrades and builds are made.
          http://danreb.com/content/how-quickly-enable-or-disable-drupal-cssjs-optimization-using-drush

            People

            • Assignee:
              Coleman Watts
              Reporter:
              Stoob

              Dates

              • Created:
                Updated:
                Resolved: