Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
W
WordPress
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • WordPress
  • Issues
  • #34

Closed
Open
Opened Jul 31, 2019 by tommybobo@tommybobo

WP_Debug breaks CiviCRM Menu Bar

To replicate using most recent versions of WP and CiviCRM

  1. Add define('WP_DEBUG', true); to wp-config.php
  2. Refresh page on CiviCRM.

If a debugging message is present, it will be at the top of the page. This is breaking the Menu Bar JS. Here are the console errors.

Error: CRM.url called before initialization Common.js:1481:31 console https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/Common.js?r=2QOSS:1481 url https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.ajax.js?r=2QOSS:19 initialize https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:18 https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:486 https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:488

SyntaxError: expected expression, got '<' admin.php:1

TypeError: tplURL is undefined crm.ajax.js:26:15 url https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.ajax.js?r=2QOSS:26 initialize https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:18 https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:486 https://sandbox.example.org/wp-content/plugins/civicrm/civicrm/js/crm.menubar.js?r=2QOSS:488

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/wordpress#34