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

CMSUser has Drupal 6/7 code that breaks when using with Drupal 8

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Steps to reproduce:

      1. Go to /civicrm/contact/add?reset=1&ct=Individual
      2. Click the select under "Current Employer" and then the "New organization" button
      3. A dialog appears with nothing in it, and there's a "Network Error" notification
      4. Check PHP log and see below:
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Call to undefined function variable_get() in /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/BAO/CMSUser.php on line 102"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP Stack trace:"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   1. {main}() /var/www/roundearth-upstream/index.php:0"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   2. Drupal\Core\DrupalKernel->handle() /var/www/roundearth-upstream/index.php:19"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   3. Stack\StackedHttpKernel->handle() /var/www/roundearth-upstream/core/lib/Drupal/Core/DrupalKernel.php:656"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   4. Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() /var/www/roundearth-upstream/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   5. Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() /var/www/roundearth-upstream/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php:50"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   6. Drupal\page_cache\StackMiddleware\PageCache->handle() /var/www/roundearth-upstream/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php:47"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   7. Drupal\page_cache\StackMiddleware\PageCache->pass() /var/www/roundearth-upstream/core/modules/page_cache/src/StackMiddleware/PageCache.php:78"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   8. Drupal\Core\StackMiddleware\KernelPreHandle->handle() /var/www/roundearth-upstream/core/modules/page_cache/src/StackMiddleware/PageCache.php:99"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP   9. Drupal\Core\StackMiddleware\Session->handle() /var/www/roundearth-upstream/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php:47"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  10. Symfony\Component\HttpKernel\HttpKernel->handle() /var/www/roundearth-upstream/core/lib/Drupal/Core/StackMiddleware/Session.php:57"
      roundearth-upstream_1        | 172.18.0.34 -  05/Oct/2017:21:07:51 +0000 "GET /index.php" 500
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  11. Symfony\Component\HttpKernel\HttpKernel->handleRaw() /var/www/roundearth-upstream/vendor/symfony/http-kernel/HttpKernel.php:64"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  12. call_user_func_array:{/var/www/roundearth-upstream/vendor/symfony/http-kernel/HttpKernel.php:144}() /var/www/roundearth-upstream/vendor/symfony/http-kernel/HttpKernel.php:144"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  13. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() /var/www/roundearth-upstream/vendor/symfony/http-kernel/HttpKernel.php:144"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  14. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() /var/www/roundearth-upstream/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:97"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  15. Drupal\Core\Render\Renderer->executeInRenderContext() /var/www/roundearth-upstream/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:124"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  16. Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() /var/www/roundearth-upstream/core/lib/Drupal/Core/Render/Renderer.php:574"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  17. call_user_func_array:{/var/www/roundearth-upstream/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123}() /var/www/roundearth-upstream/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  18. Drupal\civicrm\Controller\CivicrmController->main() /var/www/roundearth-upstream/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php:123"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  19. Drupal\civicrm\Civicrm->invoke() /var/www/roundearth-upstream/profiles/roundearth/modules/contrib/civicrm/src/Controller/CivicrmController.php:44"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  20. CRM_Core_Invoke::invoke() /var/www/roundearth-upstream/profiles/roundearth/modules/contrib/civicrm/src/Civicrm.php:52"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  21. CRM_Core_Invoke::_invoke() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:52"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  22. CRM_Core_Invoke::runItem() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:84"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  23. CRM_Profile_Page_Router->run() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php:310"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  24. CRM_Utils_Wrapper->run() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Profile/Page/Router.php:118"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  25. CRM_Core_Controller->run() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Utils/Wrapper.php:113"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  26. HTML_QuickForm_Page->handle() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/Controller.php:351"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  27. HTML_QuickForm_Controller->handle() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/packages/HTML/QuickForm/Page.php:103"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  28. CRM_Core_QuickForm_Action_Display->perform() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/packages/HTML/QuickForm/Controller.php:203"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  29. CRM_Core_Form->buildForm() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Display.php:92"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  30. CRM_Profile_Form_Edit->buildQuickForm() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Core/Form.php:564"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  31. CRM_Profile_Form->buildQuickForm() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Profile/Form/Edit.php:220"
      roundearth-upstream_1        | [05-Oct-2017 21:07:51] WARNING: [pool www] child 8 said into stderr: "NOTICE: PHP message: PHP  32. CRM_Core_BAO_CMSUser::buildForm() /var/www/roundearth-upstream/vendor/civicrm/civicrm-core/CRM/Profile/Form.php:818"
      

      This comes down to some Drupal 6/7 code in civicrm-core/CRM/Core/BAO/CMSUser.php on line 102

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dsnopek David Snopek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: