fetch_param() conflict
Posted: 10 April 2008 11:30 AM   [ Ignore ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

I am integrating Ratings into a site, and the rating confirmation/thank you page template I set up has a standard simple expression engine search form on it. The rating thank you page is throwing this error:

Fatal error: Call to a member function fetch_param() on a non-object in /[PATH]/modules/search/mod.search.php on line 1263

I had a similar plugin conflict that I eliminated by removing the plugin code, but a conflict with the search form is notable…

Thank you for a super great plugin!

Profile
 
 
Posted: 10 April 2008 11:35 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

komra,

What does your Rating form code look like? smile

Does the “thank you” page load completely, and additionally show that error, or is the error the only thing that loads? smile

 Signature 
Profile
 
 
Posted: 10 April 2008 11:45 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

it only shows the error code… I fixed it by eliminating the search form from the thank you page:
http://flipforbudget.com/videos/our_road_trip_on_a_budget/

Profile
 
 
Posted: 11 April 2008 06:25 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

komra,

What does the template code look like for the Thank you page (with the search form)?

Thanks smile

 Signature 
Profile
 
 
Posted: 11 April 2008 07:27 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
 <
meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <
title>{embed:page_title} {site_name}</title>

 <
meta name="robots" content="index,follow" />
 <
meta http-equiv="imagetoolbar" content="false" />
 <
meta name="MSSmartTagsPreventParsing" content="true" />

 <
style type="text/css" media="all"> @import url(/css/tripoli/reset.css); @import '/css/tripoli/generic.css'; </style>
 <!--
[if IE]>
 <
style type="text/css" media="all"> @import url(/css/tripoli/ie.css); </style>
 <!
[endif]-->

 <
style type="text/css" media="all"> @import url(/css/flip.css); </style>
 <!--
[if lte IE 6]>
 <
link rel="stylesheet" href="/css/flip-ie.css" media="all" />
 <!
[endif]-->
 <!--
[if gte IE 7]>
 <
link rel="stylesheet" href="/css/flip-ie7.css" media="all" />
 <!
[endif]-->


 
 
<!--
[if gt IE 6]>
 <
style type="text/css" media="all"> @import url(/css/wufoo.css); </style>
 <
style type="text/css" media="all"> @import url(/css/poll.css); </style>
 
<!
[endif]-->
<!--
[if !IE]><!-->
 <
style type="text/css" media="all"> @import url(/css/wufoo.css); </style>
 <
style type="text/css" media="all"> @import url(/css/poll.css); </style>
 
<!--<!
[endif]-->

 
 
</
head>
<
body>
<
div class="dropshadow white">
 <
div class="page">
  <
div id="header">
<
div id="login">
{if logged_out}
<a href="{path=players/forgot_password}">Forgot password?</a>
&
nbsp;&middot;&nbsp;
<
a href="{path="players/login"}">Login &raquo;</a>
{/if}
{if logged_in}
Welcome 
<a href="{path=players/profile}">{screen_name}</a>!

&
nbsp;&middot;&nbsp;

<
a href="{path=players/profile}">Profile</a>

&
nbsp;&middot;&nbsp;

<
a href="{path="LOGOUT"}">Logout</a>
{/if}
</div>

  </
div>
<
div id="headertab">

<
div id="div-clicktoenter">
<
a href="/" target="_blank"><img src="/gfx/logo-budget.gif" alt="" width="120" height="87" border="0" /></a><a href="/"><img src="/gfx/logo-ffb.gif" alt="" width="486" height="87" border="0" /></a>
{if logged_in}
<a href="{path=players/upload}"><img src="/gfx/headertab-uploadvideo.gif" alt="" width="245" height="40" border="0" id="headertab-uploadvideo" /></a>
{if:else}
<a href="{path=players/register}"><img src="/gfx/headertab-clicktoenter-off.gif" alt="" width="245" height="40" border="0" id="headertab-clicktoenter" /></a>
{/if}
</div>
<
div id="div-contestinfo">
<
a href="{path=players/register}"><img src="/gfx/headertab-contestinfo.gif" alt="" width="901" height="52" border="0" id="headertab-contestinfo" /></a>
</
div>
<
div id="div-howtoplay">
{if segment_1=='videos' || segment_1=='search'}
<div id="search-box">
 <
div id="search-inner">
{if embed:page_title!='Thanks for Rating this Video'}
{exp
:search:simple_form weblog="videos"}
<label for="keywords">Search videos</label>
<
input type="text" name="keywords" id="keywords" />
<
input name="submit" id="submit" type="image" value="submit" src="/gfx/arrow-gray.gif" />
{/exp:search:simple_form}
{
/if}
  
 
</div>
</
div>
{/if}


<div id="breadcrumbs">
<
a href="/">&laquoHome</a>
&
middot{embed:page_title}
</div>
<
a href="{path="rules_and_stuff/how_to_play"}"><img src="/gfx/headertab-howtoplay-off.gif" alt="" width="112" height="23" border="0" id="headertab-howtoplay" /></a>
</
div>
</
div>


<
div id="content" class="vidcontent">
{if success}<h1>Thanks for rating this video</h1>{/if}
{if failure}
<h1>Woopssomething didn't work out</h1>{/if}
<p>{message}</p>
<p><a href="/{segment_1}/{segment_2}/">&laquo; return to video</a></p>
</div>



 </div>
</div>

<div class="dropshadow blue">
 <div class="footer">
 <div class="alert">There are 2 days and 15 hours until the Contest Begins!</div>
 </div>
</div>
<div class="bluebottom">
<!--[if !IE]><!-->
<img src="/gfx/pageshadow-bottom-gray.png" alt="" width="909" height="20" border="0" />
<!--<![endif]-->
<!--[if lte IE 6]>
<img src="/gfx/pageshadow-bottom-ie6-bluebk.gif" alt="" width="909" height="20" border="0" />
<![endif]-->
<!--[if gt IE 6]>
<img src="/gfx/pageshadow-bottom-gray.png" alt="" width="909" height="20" border="0" />
<![endif]-->

</div>
<div id="footnotes">
&copy; 2008 <a href="#" title="" target="_blank">Client, Inc</a>. 
</div>
</body>
</html>

Profile
 
 
Posted: 11 April 2008 12:18 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

There’s no Rating code in there, so I don’t believe it could be related to Rating…

Unless there’s something I’m missing here smile

 Signature 
Profile
 
 
Posted: 11 April 2008 12:29 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

thanks for your diligent help on this. I could be missing something myself. However this is the page that gets called from this code:

{exp:rating:form 
 form_name
="starrater"
 
weblog="videos"
 
required="name|email"
 
anonymous="yes"
 
require_membership="no"
 
notify="[blah]@gmail.com" 
 
return="{path='videos/rating-thanks'}"
 
template="videos/rating-thanks"
 
admin_template="notify_komra"
 
user_template="notify_komra"
 
status="open"
}

and there is the conditional in there, but it looks to me like it works similar to the functionality that would normally call the user message template… I have to say that getting the correct settings for template, return, admin_template, user_template were somewhat opaque to me, this being my first implementation of the script. The script rocks! for sure. So I may not be understanding something here. I do know that if i disable search on the rating-thanks page, everything works fine.

Profile
 
 
Posted: 11 April 2008 09:38 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

The fact that the error you see references modules/search/mod.search.php on line 1263 makes it clear that the error is not in the Rating code. Have you considered upgrading your EE install? Or double checking that you do not have a corrupted mod.search.php file?

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 12 April 2008 07:53 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

thanks, I will do that. I appreciate your help

Profile
 
 
Posted: 17 April 2008 03:24 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

any ideas you have for troubleshooting this would be welcome. When a visitor to the site attempts to submit a rating, the response page throws an error like this: Fatal error: Call to a member function fetch_param() on a non-object in {native EE codebase file} on line XXX

I have two instances of this error, here are the codes from the lines referred to in the Fatal error alert:
$result_page = ( ! $TMPL->fetch_param(’result_page’)) ? ‘search/results’ : $TMPL->fetch_param(’result_page’);
if ($TMPL->fetch_param(’related_categories_mode’) == ‘on’)

This only occurs after a visitor submits a rating.

The rating does in fact get written to the database, but the thank you page does not load and the Fatal Error alert is the only thing returned by that page—no template code output, no EE super admin debugging messages available.

Here are the hidden form fields, if that makes any difference.

<form id='rating_formbudget_savvy' name='starrater' method="post" action="http://[DOMAIN]/videos/budget_savvy/"  >
<
div class='hiddenFields'>
<
input type="hidden" name="ACT" value="21" />
<
input type="hidden" name="RET" value="http://[DOMAIN]/videos/budget_savvy/" />
<
input type="hidden" name="URI" value="/videos/budget_savvy/" />
<
input type="hidden" name="PRV" value="" />
<
input type="hidden" name="XID" value="ebe17263eee73198f15a73f299606f3764c53b9b" />
<
input type="hidden" name="entry_id" value="71" />
<
input type="hidden" name="form_name" value="starrater" />
<
input type="hidden" name="status" value="open" />
<
input type="hidden" name="anonymous" value="y" />
<
input type="hidden" name="allow_duplicates" value="y" />
<
input type="hidden" name="user_template" value="notify_admin" />
<
input type="hidden" name="admin_template" value="notify_admin" />
<
input type="hidden" name="required" value="name|email" />
<
input type="hidden" name="return" value="http://[DOMAIN]/videos/rating-thanks/" />
<
input type="hidden" name="template" value="videos/;rating-thanks" />
<
input type="hidden" name="site_id" value="1" />
</
div>

I will now go look for a utility that will help me step through the execution of the code for this page.

I am not asking you to solve this, however if any ideas come to mind—some pattern as why those to member functions calls fail, that would be great. thanks!

Profile
 
 
Posted: 18 April 2008 06:05 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

komra,

I notice you’re using the template="videos/rating-thanks” parameter…
Can you remove that from the loop and see what happens? smile

 Signature 
Profile
 
 
Posted: 18 April 2008 07:32 AM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

thank you, that fixed it.

Profile