Help - Search - Members - Calendar
Full Version: Undefined subroutine &MT::Entry::RELEASE
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Raffaele
Problem is Alternate template.

I installed MT v. 2.661 on a website for some schools, and everything works.
I need to have more templates for the search, so I have modified mt.cgt, as guide says.

QUOTE
Add the templates to your configuration.
Open up your mt.cfg file in a text editor, and use the AltTemplate directive to configure the alternate templates. For example, if you have two weblogs (Work and Play), and you want each weblog to have its own template, you might add something like this:
AltTemplate root root.tmpl
AltTemplate primoc primoc.tmpl
ecc. ecc

Configure the search form.
To tell Movable Type which template to use when building the search results pages, you use a hidden form input. Add this to the search form on your Work weblog, for example:


(Note: if you wish to restrict the search to just this one weblog, you may also want to add



to the form.)




Everything works, but if I put no words in the search fill, this error is shown:

QUOTE
An error occurred:

Undefined subroutine &MT::Entry::RELEASE called at lib/MT/Template/Context.pm line 1670.


I have done the reupload of Confirm.pm in ASCII mode, but the same error continues to be shown.

This is my search form:

CODE
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">
<input type="hidden" name="Template" value="root" />
<!--<input type="hidden" name="IncludeBlogs" value="<$MTBlogID$>" />-->
<label for="search" accesskey="4">Search this site:</label><br />
<input id="search" name="search" size="20" /><br />
<input type="submit" value="Search" />
</form>


This is the link:

My Webpage

Can you help me?
Thank you

Raffaele (Italy)
Raffaele
Hi,
sorry I think having done some mistakes on my modifications, becouse the standard template works.
Now I have to understand why.

Thank you
Raffaele
johnpil
I am seeing the same error. I modified my default.tmpl and it was working correctly with a blank search.

However, after some more (unrelated) stylesheet changes and other things, it is no longer working.

If you discover the problem, please post here.

I will do the same.

Thanks,
john
Raffaele
Resolved.
this is the problem:


In AlternateTemplate I got:
CODE
  <$MTInclude module="principale"$>


and inside of the module "principale" I have the plugin "MTFilterCategories"


This is the code of the module "principale"

CODE
<!-- Categoria Circolari, News  -->
<ul>
<MTCategories show_empty="1">
<MTFilterCategories include="News|Circolari">
 <li><a href="<$MTCategoryArchiveLink$>" title="canale informativo <$MTCategoryLabel$>"><$MTCategoryLabel$></a>
 <$MTCategoryDescription$></li>
</MTFilterCategories>
</MTCategories>
</ul>

<!-- Fine categoria Circolari, News -->


This plugin causes the following error:
CODE
An error occurred:

Undefined subroutine &MT::Entry::RELEASE called at lib/MT/Template/Context.pm line 1670.
staggernation
I'm not sure this has anything to do with the plugin. It looks like the MTCategories handler doesn't require MT::Entry;, which isn't usually a problem in a regular template, but it looks like it may be a problem in the context of a search results template. If you add require MT::Entry; around line 1655 of lib/MT/Template/Context.pm (within _hdlr_categories, where the other require statements are), that may fix the problem.
Raffaele
Hi,
thank you very much. You are right. Now everything works well, in fact the problem was not on plugin but on MT. Your suggestion solved my problem.
So I was wondering if that is a MT bug, what do you tell me about?

Thanks a lot

Raffaele
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.