VOL-49 JavaScript files from extension are not handled properly by Drupal optimization

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.3
    • Fix Version/s: 2.0
    • Labels:
      None
    • Documentation Required?:
      None
    • Sprint:
      Week 35

      Description

      The various JavaScript files sent to the browser by CiviVolunteer are not handled/recognized by Drupal when the performance setting "Optimize JavaScript Files" is enabled. (This setting is located at: http://mygroup.org/admin/settings/performance )

      The side effects of this are different in Drupal 6 vs Drupal 7.

      In Drupal 6, NONE of the CiviVolunteer JavaScript files are sent to the browser nor included in the Drupal compressed files. This renders CiviVolunteer completely unusable.

      In Drupal 7, the CiviVolunteer JavaScript files are sent to the browser uncompressed.

      BTW: The same issue is occurring for extension-provided CSS files.

      More details about this issue can be found on the forums at: http://forum.civicrm.org/index.php/topic,32890.0.html

        Attachments

        1. html.png
          344 kB
          Frank J. Gómez
        2. js.png
          203 kB
          Frank J. Gómez

          Activity

          [VOL-49] JavaScript files from extension are not handled properly by Drupal optimization
          Frank J. Gómez added a comment -

          In Drupal 7, I am seeing what appears to be the correct behavior. The JS-driven interfaces work whether optimization is on or not. Moreover, as the attached screenshots show, CiviVolunteer JS is getting served out of sites/default/files/js rather than the extensions directory, and multiple volunteer JS files are being combined into one.

          In Drupal 6, I am seeing different behavior, but I would argue that it is the correct behavior. The JS-driven interfaces work whether optimization is on or not. Turning optimization on has no effect, however. The JS files are not combined into one, nor are they served out of sites/default/files/js. Then again, neither are any CiviCRM core files. It seems that CiviCRM doesn't know how to tell Drupal 6's optimizer about its assets, and it is unreasonable to expect an extension to integrate with the CMS in a way that core does not.

          In any case, I think these issues lie upstream of CiviVolunteer. As far as I can tell, changing the behaviors in questions would require changes to core code, not to CiviVolunteer.

            People

            • Assignee:
              Frank J. Gómez
              Reporter:
              Sarah Gladstone

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified