Skip to main content
Level 2
July 10, 2019
Question

Why am I getting an "Invalid Module" error? Please help.

  • July 10, 2019
  • 1 reply
  • 5678 views
I'm getting an "Invalid Module: #rich-text-one-button-1" error when trying to approve my Marketo email template. I'm not a Marketo expert but I'm the closest thing my client has to one and I'm stumped. The error specifically mentions #rich-text-one-button-1. Looking at my template, I have two "Rich Text One Button" modules - one with id rich-text-one-button and another with id rich-text-one-button-1. Both modules appear to use the same variable names for their buttons. Here's the relevant structure: Variable Declarations in Head: html First Module (this one works): html
${richTextOneLinkText1}
Second Module (this one causes the error): html

If you haven't already, you will soon be receiving your first invoice. To ensure everything is clear and easily understood, we've wanted to provide this helpful visual guide and glossary of terms that will walk you through each part of your invoice.

${richTextOneLinkText1}
The container structure: html
Both modules appear to reference the same variables (${richTextOneLink1} and ${richTextOneLinkText1}), and the second module has id="rich-text-one-button-1" which matches the error message. The template has many other modules defined as well (Rich Text Only, Rich Text with two buttons, Rich Text Grey Background, Split Column modules, Featured sections, Icon variants, etc.).
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Dave_Roberts
Level 10
July 11, 2019

Here's a link to the Marekto Docs on email modules: 

https://docs.marketo.com/display/public/DOCS/Email+Template+Syntax#EmailTemplateSyntax-Modules

Here's an excerpt from that, I've highlighted in red the rule about modules inside a container, I think that might be what's messing up your validation.

Modules

Modules are templatized sections defined at the template level that will show up for end users to insert into their email. Because you have pre-built these modules, you can ensure they will interact with the rest of your email content gracefully (in a fully responsive manner). You can only put a module in a container.

For containers of type <table>, <tbody>, <thead>, or <tfoot>:

Specified using <tr> with class=”mktoModule”

For containers of type <td>:

Specified using <table> with class="mktoModule"

It looks like the error your getting relates to the first module in the 2nd "container" (<table>) in the HTML. 

In a fairly standard setup you'd have one large body <table> that had the mktoContainer class and then every <tr> inside of that would have the mktoModule class. The key ingredient here is that the container must be the "parent" element and the modules must be a direct "child" of that parent element. 

I'd try to have the architecture of the html rewritten so that you've got one <table> that's the parent container (like a body table) and then directly inside that table, row-over-row, you'd include a <tr class="mktoModule"> (module). In short, you could try to combine the table wrappers you're using into a single wrapper (<table>) and give that the "mktoContainer" class.

Level 2
July 11, 2019

Thank you so much!

Dave_Roberts
Level 10
July 11, 2019

Glad I could help, let me know if that solves the issue for you or if there's anything else you're running into getting the tables re-arranged, I'd be happy to help get it right for you.