user-pic

Major Error when editing GlobalJavaScript template in MT5

Vote 0 Votes

I tried to edit the GlobalJavaScript file and when I try to save, I get the error:

Publish error in template 'JavaScript': Error in <mtInclude> tag: <mt:Ignore> with no </mt:Ignore> on line 40.

It seems that the auto formatting is adding line 41 and 43 (if you open the actual file in dreamweaver) together and not letting you add line breaks. Is anyone else having problems trying to edit this template? Is there a way to where you can reply the actual file so we don't have to go through the editor? Thanks

It's causing problems, I can't use any of the voting, commenting, and logging in now :-/

Reported on Movable Type 5

4 Replies

| Add a Reply
  • This error means that in the JavaScript template for your blog, there is an <mt:Include module="module-name-here"> tag which includes a module. This is probably the "GlobalJavaScript" module.

    In this module there is a <mt:Ignore> tag without a paired closing tag: </mt:Ignore>

    Look in the included module for this error in the template code.

    This should fix the error.
    --

    If you want to edit the file rather than edit the template through the MT editor, use the "Link to file" field to link the template to a file on the server file system.

    • default userpic

      Absolutely incorrect. @marcos is right.

      This is a bug in MT. When you open the file in MT, line 40 is so long that MT istelf inserts an un-closed mt:Ignore tag in the line and omits the rest of the line, completely shattering the file, with no hope of recovering it.

      This has slowed down my production on SEVERAL client projects now, and it needs to be fixed.

  • Thanks for the response. I did look for a missing an open but couldn't find one. I ended up backing up the site and just re-installing MT5 and going with a "fresh" GlobalJavascript template for a quick fix which did do the trick. Unfortunately, I tried again "for fun" and installed another one, went to edit template and simply just saved the GlobalJavaScript template and it gave me the error without me actually changing anything.

    I thought this may just be my browser but I tried replaced the code to change the line break issue but it failed on firefox, safari and IE. I added a after line 81 and it saves but loses functionality.

    Again, I found my temp fix which is at least working, so it is not a huge issue for me anymore. But if you have time and do see any issues, please let me know for future reference. Thanks

  • I have noticed this error as well when attempting to modify the GlobalJavaScript template using movable type's built-in editor.

    The length of line 40 appears to be the cause of the issue. It begins with:

    if(!this.JSON){JSON={} ...


    Attempting to link the template to a file causes a publishing error identified as occurring on line 40 to appear.

    The only way around this issue that I have found is to link the template to a file and then overwrite lines 40 and 1822 with the lines from the original source file, which in my case is the file:

    MT-5.01-en/addons/Community.pack/templates/global/javascript.mtml

    After this process the template can be modified using an external editor.

    Needless to say, this is quite a hassle to go through to edit one file and a fix to the mt editor or a default 'link to file' for GlobalJavaScript would be a great help.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012