2

so I get this error in console

JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:542
SyntaxError: expected expression, got '<'[Learn More] en_US:1
Error: CRM.url called before initialization Common.js:1605:16
Error: tplURL is undefined
CRM.url@https://domain.tld/sites/all/modules/civicrm/js/crm.ajax.js?r=rtOiJ:26:9
CRM.api3@https://domain.tld/sites/all/modules/civicrm/js/crm.ajax.js?r=rtOiJ:68:12
crmApi@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:4866:13
next@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:5040:9
enqueue@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:5057:11
save@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:2474:16
selectedMail@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:615:20
invoke@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:42:6
m/<@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:5334:32
q@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:8:57
m@https://domain.tld/civicrm/asset/builder?an=angular-modules.js&ap=TU%2B7CsMwDPyXzKZLt25pSrcuCfkANRaOQJGDLYXS0n%2Bv7anLPeAO7j7dFr0x5u7SgQRjSHdinHeO4N2Stn7fG6nCsm4o2pxpzHBg1cNLKt3OFR9ATBL%2BZH%2BtZsQcLS2tMEZTvJJ4TNXO1FCJnSfgGCZMB5WohJYsPIGQ0htdVlDLOwR0Rqcck8KTm7bSz86krvLDWq6US98f&ad=cee702615cc276585c8e78ed78bbaa0d:5333:479
e/<@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:132:434
$eval@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:147:65
$digest@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:144:123
$apply@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:147:361
c/<@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:21:115
invoke@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:42:6
c@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:21:36
Gc@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:21:332
se@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:20:1
@https://domain.tld/sites/all/modules/civicrm/bower_components/angular/angular.min.js?r=rtOiJ:323:54
i@https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=rtOiJ:2:27444
fireWith@https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=rtOiJ:2:28213
ready@https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=rtOiJ:2:30004
K@https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=rtOiJ:2:30366
angular.js:14199:17
f/<
angular.js:14199:17
vf/this.$get</<
angular.js:10707:6
e/<
angular.js:16704:8
$eval
angular.js:17994:15
$digest
angular.js:17808:14
$apply
angular.js:18102:12
c/<
angular.js:1812:8
invoke
angular.js:4771:15
c
angular.js:1810:4
Gc
angular.js:1830:11
se
angular.js:1715:4
<anonymous>
angular.js:32616:4
i
https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js:2:27444
fireWith
https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js:2:28213
ready
https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js:2:30004
K
https://domain.tld/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js:2:30366

checked permissions, double checked resource url's, disabled asset caching, removed all browser cache, checked different browsers.... And not sure where to go next...

Update: it was not a duplicate. the javascript did not load because of database error

3
  • excuse me I had the problem with 5.2.1, tried upgrading to 5.3.0 but no luck. Using drupal 7.59
    – stijn
    Commented Jul 18, 2018 at 20:31
  • 1
    Possible duplicate of How can I best debug this JS issue? Commented Jul 18, 2018 at 21:11
  • Welcome to Stack Exchange! You asked this question really well with all the important details. I'm flagging it as a duplicate, but that's not a reflection on you - this is really solid, and it's not obvious it's a duplicate. I'm posting a more detailed answer on the original: civicrm.stackexchange.com/questions/5084/… Commented Jul 18, 2018 at 21:12

2 Answers 2

2

Generically: You have a Javascript error, so I would definitely consult the Troubleshoot Javascript errors post which describes additional steps to try.

That said - I know what your problem is, and would like to give a step-by-step of how I worked it out.

I see in your second line that you have a syntax error of some sort. A syntax error in JS will generally disable all the following JS on the page, which will lead to this issue. So ignore everything after line 2, that will get fixed when you find the syntax error.

From the SyntaxError, I can see the problem is on line 1 of the en_US file.

So I open my browser's developer tools (F12). Then I go to the "Network" tab, filter by JS, and reload the page. I look for the en_US file. I right-click and select "Open in New Tab" (see screenshot below).

What you SHOULD see is a JavaScript file that tells CiviCRM how to load the correct translations for certain fields. What YOU will see is a first line with <[Learn More] on it.

The reason that's happening is you have some CMS plugin/module that's injecting data on to every page.

enter image description here

1
  • thank you for this. Looking a bit further: the file trying to load is domain.tld/civicrm/ajax/l10n-js/en_US. Now I see there a database error: CiviCRM_API3_Exception: "DB Error: no such field. from civicrm/CRM/Core/BAO/UFGroup.php(3339)
    – stijn
    Commented Jul 19, 2018 at 5:19
1

the problem was inconsistency in the civicrm_uf_group_en_US view I recreated the view based on another installation including the missing field 'frontend_title'.

5
  • Hi Stijn - I think I just his this bug on a side post upgrade to 5.3.1 - can you please expand your answer a bit on how you fixed this? Commented Jul 20, 2018 at 15:07
  • Of course only if you have the same database error as we did. But what we did is adapt the views for the languages we use, based on another install. Is suppose we should be able to find this view in the sql from the installation files as well. But something along these lines: (damn can't add more characters)
    – stijn
    Commented Jul 20, 2018 at 16:11
  • what you need to find is a the code to create the view civicrm_uf_group_en_US (of course adapt to your language)
    – stijn
    Commented Jul 20, 2018 at 16:24
  • 2
    This would do a complete rebuild of the views; drush cvapi System.rebuildmultilingualschema Commented Jul 20, 2018 at 17:37
  • Karin, you are awesome, well at least this solution is ;-) Thank you very much!
    – stijn
    Commented Jul 23, 2018 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.