Redirect on submit
Posted: 14 April 2008 08:49 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

Hi.

I am pulling my hair our with this one - perhaps it’s a case of not seeing the wood for the trees ... anyway, having got the ratings to work / appear, the stars showing up where they should etc. I am unable as yet to get the user to a ‘here’s a confirmation that your rating was submitted’ page.

The ‘error’ mesage is this:

The following errors were encountered
The notification template that was specified is not available. Please contact customer service.
Return to Previous Page

Here’s the code for the rating:

{exp:rating:form entry_id="{entry_id}" form_name="review" require_membership="no" admin_template="admin_template" anonymous="yes" required="rating|review" status="open" XXXXX}

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<
tr>
<
td><label for="review">Your rating: </label>
<
select name="rating" class="search_box">
<
option value="1">1</option>
<
option value="2">2</option>
<
option value="3">3</option>
<
option value="4">4</option>
<
option value="5">5</option>
</
select> <img src="http://www.domain.com/directory_a/directoryb/rating_star.gif" alt="0" border="0" class="rating_star" /><br />
<
br />
<
div class="comments_form_name">Full name</div>
<
input name="name" type="text" class="search_box" size="30" />
<
br />
<
div class="comments_form">Contact email</div>
<
input name="email" type="text" class="search_box" size="30" />
<
br />
<
div class="comments_form">Your comments</div>
<
textarea name="review" cols="55" rows="12" class="search_box"></textarea>
<
br /></td>
</
tr>
</
table>
<
br />
<
input name="submit" type="submit" class="formbut" value="Submit" />

{/exp:rating:form}

- - - - -

I have tried ... (for XXXXX above):

{exp:rating:form entry_id="{entry_id}" form_name="review" require_membership="no" admin_template="admin_template" anonymous="yes" required="rating|review" status="open" return="{path='template_group/template_name'}"}

{exp:rating:form entry_id="{entry_id}" form_name="review" require_membership="no" admin_template="admin_template" anonymous="yes" required="rating|review" status="open" return="{path='template_group/template_name/'}"}

{exp:rating:form entry_id="{entry_id}" form_name="review" require_membership="no" admin_template="admin_template" anonymous="yes" required="rating|review" status="open" return="http://www.domain.com/directory_a/index.php/template_group/template_name/"}

The template_name in the template_group (template_group/template_name) does exist.

- - - - -

Alternatively, and it’s something I would probably prefer, is that rather than being redirected to another page, the page is simply ‘refreshed’, with the refreshed page showing the rating and comment which has just been submitted.

Any help / insight very gratefully received.

Thanks.

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

KCesp,

The error is not of the return URL, it’s from a parameter you’re specifying is trying to request an email notification template.
If you do not want any email notifications, remove this parameter:

admin_template="admin_template"

If you want an email notification, then make sure you’ve created that template (and named it that) in the Rating Module CP smile

 Signature 
Profile
 
 
Posted: 14 April 2008 09:33 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

Hi. Thanks for the quick reply.

Have replaced old above for new below (as a simple test):

{exp:rating:form entry_id="{entry_id}" form_name="review" require_membership="no" anonymous="yes" required="rating|review" status="open" return="http://www.bbc.co.uk"}

I’m afraid I still get the same error message.

Further thoughts?

Thanks again.

Profile
 
 
Posted: 14 April 2008 09:35 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

May I have a look at the page? smile

 Signature 
Profile
 
 
Posted: 14 April 2008 10:00 AM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

I’ll contact you via PM now, if that’s OK.

Profile
 
 
Posted: 14 April 2008 10:33 PM   [ Ignore ]   [ # 5 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

Hi Pie Man. Did you receive my PM? If not, I will resend.

Profile
 
 
Posted: 15 April 2008 11:30 PM   [ Ignore ]   [ # 6 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

Does anyone have an alternative solution that can work around the problem I am having? I.e. instead of a redirect, a simple page refresh on clicking the ‘Submit’ button?

Thanks.

KCesp

Profile
 
 
Posted: 16 April 2008 06:11 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Sorry KCesp, (got your PM)

I’ve been bogged down with a few things lately… I apologize for the incovenience. smile

I really don’t think the return parameter is the issue, as the error is mentioning a notification template.

I wonder if this is an issue with a CP setting....
Have a look here:

CP Home › Modules › Rating › Website Preferences

Make sure User notifications on? and Notify authors? are set to ”NO” an that Notification emails is blank

 Signature 
Profile
 
 
Posted: 16 April 2008 07:03 AM   [ Ignore ]   [ # 8 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

- Make sure User notifications on? and Notify authors? are set to ”NO” an that Notification emails is blank -

Hi Pie Man - no worries, I understand. I am grateful for your help and advice.

User notifications on? That was set to YES, have just changed it to NO
Notify authors? That was set to YES, have just changed it to NO
Notification emails - that HAD an email address, it does NOT now i.e. it is now blank

Will retry and advise.

Thanks again.

KCesp

Profile
 
 
Posted: 16 April 2008 07:07 AM   [ Ignore ]   [ # 9 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-04-04

Pie Man - perfect, perfect, perfect. Worked first time ...

Again, very grateful for your time on this.

Cheers!

KCesp

Profile
 
 
Posted: 16 April 2008 07:33 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Good to hear! LOL

 Signature 
Profile