SOLVED

Invalid Module Error

Go to solution
alord
Level 1

Invalid Module Error

Hello,

I am working on building a very large "Master Template" that compiles all of our modules used in all emails into one big template. When I try to approve the template, it keeps giving me multiple "Invalid Module" errors. I am trying to figure out what is causing this issue since I am copying the code from our already used emails that do not give this error. Any insight or suggestions would be greatly appreciated. Because this template is so large, I copied the code into a google document because it exceeded the limit allowed on here. You can view the code by going here:

https://docs.google.com/document/d/18-6u094WrcjVLgkS-wY7jS_kvvJR4497DUlDeDCBwkk/edit?usp=sharing

 

Thanks,

Ashley

1 ACCEPTED SOLUTION

Accepted Solutions
Dave_Roberts
Level 10

Re: Invalid Module Error

Hey Ashley, thanks for posting a link to the code here, that made it much easier to grab and test that stuff in a sandbox.

 

The most immediate issue here looks like we've got at least a few duplicate modules in the template code you posted. You'll want each of the modules and editable areas have a unique id="" value, that should help to clear up most of the errors in the "Validate HTML" pop-up. 

 

In the screenshot below, I've shown the Validate HTML pop up (Template Validation Summary) which can be found under the Email Template Actions dropdown in the top left of the editor. You can run this to get a list of the things to address as well as to track your progress as you work to resolve the errors (they should go away as you fix them).

Email Template Options > Validate HTMLEmail Template Options > Validate HTML

 

Here's a rundown of the error categories Im seeing in there, and a recommendation for each:

Invalid Module: This usually means you're architecture isn't consistent. There's a rule w/ email that modules must be direct children of the mktoContainer element. In the example above, you'll see this module is nested inside a table (green) and that's what's causing this error. Since you're using a <td> for your "mktoContainer", you'll want to make sure ALL modules are <table> elements that are directly inside (not nested) the <td class="mktoContainer">. This'll help resolve all of the Invalid Module issues.

 

Duplicate Element Id: This is just what it sounds like - there's more than one element using the same id="" value. In any HTML document, the "id" property is meant to be unique, so you'll want to work thru each of those errors and change the id value for anything that's currently matching. You can get the duplicate id's from the pop-up (above) and then use the FIND functionality in the editor to search for those and change them. Each element should have a unique id="" value when you're done and these errors should go away.

 

Unused Variable: This warning is more benign, it just means you've got variables declared in the <head> (purple code in Marketo editor) that aren't used anywhere in the template. You can work thru this list of errors by finding the <meta id="_______"> (where the ____ = the name mentioned in the error message) and removing them from the template. Since they're not used this shouldn't have any functional consequences. There's also not a functional consequence that Im aware of that would impact your email delivery or functionality in the editor if you were to leave all of these errors alone.

 

Let me know if there's anything that's tricky to work out or could use some more explaination and I'd be happy to see what I can do to help out here.

 

Thanks again,
Dave

View solution in original post

2 REPLIES 2
Dave_Roberts
Level 10

Re: Invalid Module Error

Hey Ashley, thanks for posting a link to the code here, that made it much easier to grab and test that stuff in a sandbox.

 

The most immediate issue here looks like we've got at least a few duplicate modules in the template code you posted. You'll want each of the modules and editable areas have a unique id="" value, that should help to clear up most of the errors in the "Validate HTML" pop-up. 

 

In the screenshot below, I've shown the Validate HTML pop up (Template Validation Summary) which can be found under the Email Template Actions dropdown in the top left of the editor. You can run this to get a list of the things to address as well as to track your progress as you work to resolve the errors (they should go away as you fix them).

Email Template Options > Validate HTMLEmail Template Options > Validate HTML

 

Here's a rundown of the error categories Im seeing in there, and a recommendation for each:

Invalid Module: This usually means you're architecture isn't consistent. There's a rule w/ email that modules must be direct children of the mktoContainer element. In the example above, you'll see this module is nested inside a table (green) and that's what's causing this error. Since you're using a <td> for your "mktoContainer", you'll want to make sure ALL modules are <table> elements that are directly inside (not nested) the <td class="mktoContainer">. This'll help resolve all of the Invalid Module issues.

 

Duplicate Element Id: This is just what it sounds like - there's more than one element using the same id="" value. In any HTML document, the "id" property is meant to be unique, so you'll want to work thru each of those errors and change the id value for anything that's currently matching. You can get the duplicate id's from the pop-up (above) and then use the FIND functionality in the editor to search for those and change them. Each element should have a unique id="" value when you're done and these errors should go away.

 

Unused Variable: This warning is more benign, it just means you've got variables declared in the <head> (purple code in Marketo editor) that aren't used anywhere in the template. You can work thru this list of errors by finding the <meta id="_______"> (where the ____ = the name mentioned in the error message) and removing them from the template. Since they're not used this shouldn't have any functional consequences. There's also not a functional consequence that Im aware of that would impact your email delivery or functionality in the editor if you were to leave all of these errors alone.

 

Let me know if there's anything that's tricky to work out or could use some more explaination and I'd be happy to see what I can do to help out here.

 

Thanks again,
Dave

alord
Level 1

Re: Invalid Module Error

Thank you so much, Dave! This was very helpful. I am working through the code now with all of your suggestions.