4

I upgraded to CiviCRM 4.6.2 on Joomla 3.4.1 last week. Everything seemed to work fine, however, when I tried to send out a New Email today, the CiviMail page did not display, the CiviCRM menu did not properly display nor can it be used to navigate.

I tried to see if the same problem occurs on the Joomla Demo, but CiviCRM is only on Version 4.6.0 there.

The following images reflect what I'm seeing: CiviMail Menu -> New Mailing

All other menu items under mailings display and work properly: CiviMail Find Mails Just one example.

However, the new A/B test results in the same type of screen as in image 1: CiviMail New A/B Test Screen result

I've cleaned out the Templates_C directly, along with the site & browser caches, to no avail.

I've got to get this mailing out to our members within the next few days. Any assistance would be appreciated.

3

In my case the issue was the K2 component (version 2.6.9), Joomla 3.4.1 and CiviCRM 4.6.2, specifically its system plugin, which is required for K2 to function correctly. This plugin monkeys with the HTML code and inserts Opengraph tags, but these are not escaped by CiviCRM, or they are inserted by K2 after CiviCRM has done its thing.

See plugins/system/k2.php - specifically this code section:

if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false) 
                    { 
                            $searches[] = '<html '; 
                                    $searches[] = '<html>'; 
                            $replacements[] = '<html prefix="og: http://ogp.me/ns#" '; 
                            $replacements[] = '<html prefix="og: http://ogp.me/ns#">'; 
                    }

Change this to:

$app =& JFactory::getApplication(); 
            if ($app->isSite()){ 

                    if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false) 
                    { 
                            $searches[] = '<html '; 
                                    $searches[] = '<html>'; 
                            $replacements[] = '<html prefix="og: http://ogp.me/ns#" '; 
                            $replacements[] = '<html prefix="og: http://ogp.me/ns#">'; 
                    } 
            } 

CiviRM bug tracker JoomlaWorks / K2 issue report (and patch)

  • Don't use K2 ... – Neil Z May 6 '15 at 4:03
2

The best place to start would be to go through the steps for troubleshooting javascript in CiviCRM.

  • Still having this issue in 4.6.3, and do not see any comments on 4.6.4 that this was even on the radar. Am I the only one having this issue? I do not see any specific cause during the 'steps for troubleshooting Javascript' ... – Neil Z Jun 26 '15 at 3:36
1

I had something similar after an upgrade - if you have extensions - either disable them or update them to match the version of Civi you are running...

1

I was having the exact same issue. The wasy solution for me was to convert everything over to the new Joomla articles system that is built in (which works really well) and dump (uninstall) K2. That immediately solved it for me.

  • Not using K2 .. – Neil Z May 30 '15 at 2:52
1

UPDATE: with the install of v4.6.6, the problem has been resolved. The new mail interface works fine.

Don't know if this is due to a change in teh CiviCRM coding, or something upgraded by the hosting company on their servers.

That said, I really don't care as long as its now working :)

1

Still getting same problem with civi 4.6.32, Drupal 7.56, php 5.4.45

Fixed by the workaround above of adding define('CIVICRM_CIVIMAIL_UI_LEGACY', 1); to settings.civicrm.php

0

I turned on the debugging, and looked in the console, and found this:

Empty string passed to getElementById(). jquery.min.js:2:0

SyntaxError: missing } after property list administrator:185:28881

TypeError: CRM.config is undefined administrator:5:2

TypeError: CRM.angular is undefined crmApp.js:5:6 mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create d3.min.js:3:7336

TypeError: CRM.config is undefined administrator:110:28

Error: [$injector:modulerr] Failed to instantiate module crmApp due to: [$injector:nomod] Module 'crmApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

//errors.angularjs.org/1.3.15/$injector/modulerr?p0=crmApp&p1=%5B%24injector%3Anomod%5D%20Module%20'crmApp'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.3.15%2F%24injector%2Fnomod%3Fp0%3DcrmApp%0AminErr%2F%3C%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A63%3A12%0Amodule%2F%3C%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1774%3A1%0Aensure%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1698%3A38%0Amodule%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1772%3A1%0AloadModules%2F%3C%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A4115%3A22%0AforEach%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A323%3A11%0AloadModules%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A4099%3A5%0AcreateInjector%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A4025%3A11%0Abootstrap%2FdoBootstrap%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1452%3A20%0Abootstrap%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1473%3A1%0AangularInit%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A1367%3A5%0A%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.js%3Fr%3DIpysI%3A26304%3A5%0AjQuery.Callbacks%2Ffire%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3Fr%3DIpysI%3A3143%3A10%0AjQuery.Callbacks%2Fself.fireWith%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3Fr%3DIpysI%3A3255%3A7%0A.ready%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3Fr%3DIpysI%3A3467%3A1%0Acompleted%40http%3A%2F%2Fmysite.com%2Fadministrator%2Fcomponents%2Fcom_civicrm%2Fcivicrm%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3Fr%3DIpysI%3A3498%3A3%0A angular.js:63:

I had to remove a block of the response as it triggered a warning about more than 2 links in a post.

So there's a bunch of errors there, and apparently a missing file, any advice ??

  • Those error messages are interesting. For context, the expressions "CRM.config" and "CRM.angular" refer to data that is exported using code like ```<script>var CRM={config: {...values...}, angular: {...values...}};</script>````. If you visit d46.demo.civicrm.org and go to "New Mailing", you should see that as the first <script> tag. The error suggests that either the <script> tag is missing or misplaced. (a) You might post to the full page markup online (pastie.org/gist.github.com). (b) Do you have any settings/extensions to optimize markup or scripts? (c) What's the Joomla version? – Tim Otten May 3 '15 at 19:58
  • Joomla 3.4.1 - I have no script optimization plugins on this site. Looked at that script on the demo site, then on the site I support. The script includes a bunch of data from the previous mailings done from the site. Not sure what I'm looking for, but the script tags are there at the beginning and end. – Neil Z May 4 '15 at 4:12
  • FWIW ... the Joomla demo site works fine, but it doesn't have the additional components that adds to the header (CSS lines), and apparently doesn't have any previously run mailings that add data to the original <script>var CRM= ... line. – Neil Z May 4 '15 at 4:29
  • Given the error message, I'm less concerned about the specific content inside the "<script>var CRM=...</script>" line and more concerned about where/whether it appears in the document. For example, compare the snippets in gist.github.com/totten/6e6a84df8ef32be7e76b – Tim Otten May 4 '15 at 18:28
  • Tim, in my first comment I did say that the script tags are there at the beginning and end. <script>.... </script> ... the system does put the closing tag on another line so its very easy to see. Also reading the note on that github page, yes there appears to be only one request, and it follows the CRM= line. – Neil Z May 5 '15 at 3:40
0

Evidently, I'm not the only Joomla user having this issue, as this thread:

CiviMail Incomplete Load

was opened yesterday. Unfortunately, it was closed saying that an answer could be found in THIS thread. Wish that were true.

I'm still waiting for someone to give me a hint at what to look at, other than Coleman's less than helpful "Check the troubleshooting hints".

Been there, done that, didn't help.

  • 1
    Tim Otten listed this workaround for now: "If all else fails, you can edit civicrm.settings.php and set define('CIVICRM_CIVIMAIL_UI_LEGACY', 1); . That option should be removed in 4.7, so we don't want to lean on it much, but it may help in a pinch." – Neil Z May 6 '15 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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