Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19903

Backbone noConflict behavior to ensure no conflicts with Drupal 8

    Details

    • Versioning Impact:
      Minor (add functionality in backwards-compatible manner)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      This should be done regardless of the cause of the errors with CivICRM installed in Drupal 8.2.5

      There are javascript errors on Contribution Page and Event configure forms – Load those pages and look in your javascript console.

      This causes the profile selector widget to not work, and become only normal text fields.

      about backbone in civi, from Tim on Mattermost:
      – valid point about Backbone/conflict. Backbone should have a noConflict behavior, but I don't think we're using it.
      The scope of that problem should only affect pages which incorporate CRM/UF/Page/ProfileEditor.php (e.g. the event mgmt or contrib-page mgmt ui). Off-the-cuff, it could probably be fixed with two steps:

      InCRM/UF/Page/ProfileEditor.php – after all the scripts are loaded – use addScript() to call noConflict() function
      In each of the *.js files used by ProfileEditor (e.g. js/model/crm.uf.js or js/model/crm.designer.js), use a closure so that Backbone binds to our version.
      Ex: That means changing (function($, _) { to (function($, _, Backbone) {

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jackrabbithanna Mark Hanna
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: