Jump to content

[Resolved] Mailchimp popup form no longer working in v6.07


ozzyizzy

Recommended Posts

Hi all.  

 

I put Mail chimp  script in my main.php file ( in {literal})while I was still using v6.06, and it worked mostly like I wanted it to.  There was one issue which was that it was not showing on my homepage for some reason, but was on all others.  I was planning to mainly use it to collect subscribers as I could not work out any other way to put up a popup form in cube cart.  ( very limited knowledge) .  Anyway.. It worked well for a while. 

Next, I upgraded to v6.07, and for some reason the popup stopped showing on all pages.  Using the developer tools I found the following error:

Error: multipleDefine
Stack trace:
makeError@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:119:15
defineModule@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1579:20
runDefQ/<@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1635:25
forEach@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:106:6
runDefQ@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1634:5
injectModule/onLoadCallback@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1451:6
req.injectUrl/onLoad@https://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js:1721:20
 embed.js:1893:4

src: dojoLoader embed.js:1896:6
info: Object { pid: 0, mid: "//s3.amazonaws.com/downloads.mailch…", pack: 0, url: "//s3.amazonaws.com/downloads.mailch…", executed: 5, def: function (), isXd: true, isAmd: true, injected: 2, node: <script>, 5 more… } embed.js:1896:6
. embed.js:1898:5


Does anyone know what it all means?
How do I fix this?

 

Regards

 

Link to comment
Share on other sites

I've got an error:

$.cookie is not a function.

This is in /skins/knicknacs/js/2.cubecart.js, line 2.

The fact there are only two lines in 2.cubecart.js tells me that maybe your skin is using javascript files from a version of Foundation several versions back.

Please verify that your knicknacs skin is using the /js/ folder (and /vendor/ folder) from the latest Foundation skin.

Link to comment
Share on other sites

I have just upgraded the /js/folder to the latest foundation one ( for some reason it was not).  It has not made the popup appear.  I am not sure what is meant by "$.cookie is not a function".  Is this the EU cookie compliance setting?  I have tried to enable it in my admin  although I had not enabled it in the last version either,  ( no change even after clearing cache) What needs to be changed?   More guidance please bsmither.  Thank you for trying to help me once again!

 

Link to comment
Share on other sites

The error being reported is from a function definition near the bottom of the file 2.cubecart.js. That function reads the cookie that is used to 'remember' the layout of the product panels -- grid view or list view. In the file that ships with CC607, it is line 399.

When you say, "no change even after clearing cache," are you referring to CubeCart's skin cache, or your browser's page cache. Your browser may still be holding copies of those javascript files that were the probable source of the problem.

Please learn how to have your browser force reload all the css files, javascript files, image files, etc and see if that solves the problem.

Link to comment
Share on other sites

I just re-tried your site and the error is still there. I see the jquery.cookie.min.js file getting loaded, then the 2.cubecart.js file getting loaded. And that's all good.

I am only looking at the homepage.

There are some other errors I would like for you to fix:

* In the <head> section of main.php, there is:

<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/modernizr.min.js"async></script>
<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/jquery.js"async></script>

There should be a space before async.

* Somewhere, you have added:

<div class="panel" id="box-adsense">
   <h3></h3>
   <p class="title=""
       Maybe some stuff here???
   </p>
   
   
</div>

There is no right-delimiter for the <p> tag.

* You have also added this:

<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo- config="usePlainJson: true, isDebug: false"></script>

The above may be the beginning of one long line. Please verify that there is, in fact, a space between data-dojo- and config.

I am not seeing that cookie I mentioned earlier. I think, for some reason, the script jquery.cookie.min.js is not getting run.

Link to comment
Share on other sites

Placed places in front of async.

<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/modernizr.min.js" async></script>
<script src="https://knicknacs.com.au/skins/knicknacs/js/vendor/jquery.js" async></script>

 

This is the whole code that is on my main.php  :

{literal}

<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo- config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script>

{/literal}

 

so yes, there is a space between data-doja - and config. 

If I put the right delimiter on the adsense box it shows the whole

class="title=""

on my webpage.  Come to think of it whatever changes were made during the upgrade has also stopped my adsense showing up.  Adsense is not really important as I am only using it to test dynamic content.  But I do wonder what happened there too.  I don't really want a title on the adsense box, so leaving it empty for now.

 

 

 

 

Link to comment
Share on other sites

It's strange. I visit the homepage. $.cookie is not defined. No reason for it not to be.

I go to a category page. It comes in real quick. Too quick. I get jQuery is not defined and $ is not defined.

It's as if these javascript files are not getting executed when I go to a different page.

Please make this edit in main.php:

From:
      <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/modernizr.min.js" async></script>
      <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/jquery.js" async></script>


To:
      <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/modernizr.min.js"></script>
      <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/jquery.js"></script>

I think the problem is the ASYNC. These javascript files MUST come in and get sorted by the browser before any of the other javascript files get executed that wants to use them.

You also now have this:

<div class="panel" id="box-adsense">
   <h3></h3>
   <p class="title=""></p>
   
   
</div>

It should be:
<div class="panel" id="box-adsense">
   <h3></h3>
   <p class="title"></p>
   
   
</div>

 

Link to comment
Share on other sites

I have one last suggestion. After that, I have nothing else to suggest:

Move:
{literal}
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script>
{/literal}

From where it is, to AFTER the following:
<script>
   {literal}
   $(document).foundation({equalizer:{equalize_on_stack:true}});
   $('.bxslider').bxSlider({auto:true,captions:true});
   {/literal}
</script>

 

Link to comment
Share on other sites

 

I have one last suggestion. After that, I have nothing else to suggest:

Move:
{literal}
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"e7a3b516f881c359f6c9d2797","lid":"ac2860c20e"}) })</script>
{/literal}

From where it is, to AFTER the following:
<script>
   {literal}
   $(document).foundation({equalizer:{equalize_on_stack:true}});
   $('.bxslider').bxSlider({auto:true,captions:true});
   {/literal}
</script>

 

Yessss.  That did the trick!.. my popup form is back on my product and category pages like before!.   You are awesome Mr bsmither!!.   I do have one more questions though.   Why does it not show on my main page? ( never has).  Any suggestions there?

Forget the last question.   It does show on my front page!.. Double awesomeness Mr bsmither!!.

Thank you !

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...