1. dj
  2. CMC - Mailchimp for Joomla!
  3. Wednesday, 04 September 2013
  4.  Subscribe via email
Hi. I'm trying to implement CMC with my Joomla 3.1.5 site. I get the error:

{"html":"saved","error":false}

upon submission.

I noticed this was a recent topic on this forum, however none of the possible causes seemed to resolve the issue.

I have checked with firebug and I have no javascript errors. The following is taken from the head of my website:

<script type="text/javascript" src="/naturopa/media/system/js/mootools-core.js">
<script type="text/javascript" src="/naturopa/media/system/js/core.js">
<script type="text/javascript" src="/naturopa/media/system/js/caption.js">
<script type="text/javascript" src="/naturopa/media/system/js/mootools-more.js">
<script type="text/javascript" src="//http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
<script type="text/javascript" src="//http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js">

I have attempted removing the jquery libraries and tested it out, however the error remains.

Do you have any idea what might be causing the issue?

Any help will be greatly appreciated.
Responses (8)
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
well, there should be an error in the console.
Can you give me the url of the page?

Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 1
Accepted Answer Pending Moderation
Hi Daniel,

I can't see any errors in the console. The url is naturopathyandnutrition.com.au

As my client has requested that the website be kept offline I have sent the login information to you in a facebook message (which will apparently appear under the 'other' section in your messages).

Thanks heaps for your help!
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 2
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
The module has the following 2 lines in it:

JHtml::script(JURI::root() . '/media/mod_cmc/js/cmc.js');
JHtml::_('stylesheet',JURI::root() .'media/mod_cmc/css/cmc.css');


the first one loads the js necessary, the second one loads the css. The module can work wihtout the css, but it can't without the js. Most probably you've removed it in your template override. Add the line that loads the js again in your template override and it should be fine.

Regards,
Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 3
Accepted Answer Pending Moderation
Hi Daniel,

I added the following to my template index.php file:

$doc->addScript('/media/mod_cmc/js/cmc.js');

Firebug shows that the script is being loaded, however the error message remains upon submission. What am I doing it wrong?

Thanks again.
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 4
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Well, because it is not only this. Why have you removed those things from your template override?
This code seems to be also missing:

$document = JFactory::getDocument();
$script = 'window.addEvent("domready", function() {
Locale.use("'.JFactory::getLanguage()->getTag().'");
var options = {
language : {
"updated" : '.json_encode(JText::_( $params->get( 'updateMsg' ))) .',
"saved" : '.json_encode(JText::_( $params->get( 'thankyou' ) )) .'
},
spinner : "spinner-'.$moduleId.'"
}
new cmc("cmc-signup-form-' . $moduleId . '", options);
});';

$document->addScriptDeclaration($script);
JText::script( $params->get( 'thankyou' ) );
JText::script( $params->get( 'updateMsg' ) );


You need to rework your template override and only remove the css file if you don't need it and then do the template modifications.

Right now you are hacking into something that you don't understand and it creates exactly the problems that you have.

Cheers,
Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 5
Accepted Answer Pending Moderation
Hey Daniel,

I'm not using a Template override. Rather I developed a basic one from scratch using this tutorial:

http://www.inmotionhosting.com/support/edu/joomla-3/create-template

As such the only code I have above my opening HTML tag is:

<?php

defined('_JEXEC') or die;

$doc = JFactory::getDocument();

$doc->addStyleSheet($this->baseurl . '/media/jui/css/bootstrap.min.css');
$doc->addStyleSheet($this->baseurl . '/media/jui/css/bootstrap-responsive.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/style.css');
$doc->addScript($this->baseurl . '/media/system/js/mootools-core.js');
$doc->addScript($this->baseurl . '/media/system/js/mootools-more.js');
$doc->addScript('/media/mod_cmc/js/cmc.js');
$doc->addScript('//http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', 'text/javascript');
$doc->addScript('//http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js', 'text/javascript');

?>

What do I need to add to this to make CMC work? Excuse my ignorance when it comes to Joomla templates. Thanks.
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 6
Accepted Answer Pending Moderation
Hi there Daniel,

Rather then have you field any more of my silly questions I will use mailchimps native form builder.

Thanks again for your help!
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 7
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
This doesn't make much sense then. If you don't use template overrides, then it should work out of the box.
You don't have a file in
your_template/html/mod_cmc/default.php ?

Aaaah, wait! wait! I know what is wrong. You most probably miss the header tag in your template.

<jdoc:include type="head" />


This needs to be placed within the <head></head> tags -> it makes sure that extensions, modules, plugins will be able to add scripts to the head.

You see if I use

$doc = JFactory::getDocument();
$doc->addScript(...);


the code won't be output if your template doesn't have <jdoc:include type="head" />
Add this to your <head> tags and the extension will most probably start to work. Without this tag other extensions won't work either...

More info here:
http://docs.joomla.org/Understanding_Joomla!_templates

Cheers,
Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

Complete Uninstall to Work in J4??
We have recently updated a site from Joomlav3 to v4 (4.4.2). Now when we go to m...
4 Replies
Posted on Tuesday, 30 April 2024
  • New
  • verschiedene URL's für Kursübersicht einer Kategor
    Hallo, ich habe eine Frage in Bezug auf SEO: ein externer Spezialist macht die...
    1 Replies
    Posted on Monday, 29 April 2024
  • New
  • Google no index für bestimmte Seiten/Details
    Hallo ich habe eine kleine Frage: wo kann ich einstellen, dass Google die Seite...
    1 Replies
    Posted on Wednesday, 24 April 2024
    Changes to Submission Form?
    Are you able to make changes to the Hotspot submission form? There are several f...
    0 Replies
    Posted on Friday, 26 April 2024
  • New
  • Question regarding custom fields
    How do I access custom fields after I have created them?...
    0 Replies
    Posted on Wednesday, 24 April 2024
    • #custom fields