We make tools that make websites.

Forums (Archived)

The Solspace Support Forums are now CLOSED (read-only)

Check out our new support options here. Please refer to this blog post for more information.

   

Error The action you have requested is invalid.

Rank

Total Posts: 12

Joined: Jul 10, 2008

PM

Ignore

 

Hey there,

My ratings form is giving me the following error when I try to submit a rating:

Error: The action you have requested is invalid.

This is what the code of my form looks like:

{exp:rating:form form_id="review-form" entry_id="{embed:the_id}" form_name="review-form" name="review-form" require_membership="yes" return=""}
                
<fieldset>
                    
{if duplicate}
                    
<p>Thanks for already telling us how this recipe tasted and how difficult it was.</p>
                    
{if:else}
                    
<label for="rating" id="rating">
                        
How did it taste?
                        <
select name="rating">
                            <
option value="">~ choose ~</option>
                            <
option value="1">&#10025;</option>
                            
<option value="2">&#10025;&#10025;</option>
                            
<option value="3">&#10025;&#10025;&#10025;</option>
                            
<option value="4">&#10025;&#10025;&#10025;&#10025;</option>
                            
<option value="5">&#10025;&#10025;&#10025;&#10025;&#10025;</option>
                            
<option value="">I've already rated it</option>
                        </select>
                    </label>
                    <label for="difficulty_rating" id="difficulty_rating">
                        How difficult was it?
                        <select name="difficulty_rating">
                            <option value="">~ choose ~</option>
                            <option value="1">Beginner</option>
                            <option value="2">Novice</option>
                            <option value="3">Expert</option>
                            <option value="">I'
ve already rated it</option>
                        </
select>
                    </
label>
                    
{/if}
                
</fieldset>
                <
label for="review" id="f-review">
                    
What should folks know about this recipe? <span class="note">(Optional)</span>
                    <
textarea name="review" rows="8"></textarea>
                    <
input type="submit" class="submit" value="Submit Review" />
                </
label>
            
{/exp:rating:form} 

This code is being brought into a single-entry page through an embed that is inside of a weblog:entries loop, the embed passes the entry_id variable. Any help would be very much appreciated.

Avatar
RankRankRank

Total Posts: 975

Joined: Oct 27, 2009

PM

Ignore

 

Hi Muirheadc,

Thank you for contacting us. Someone will get back to you shortly. grin

Rank

Total Posts: 12

Joined: Jul 10, 2008

PM

Ignore

 

Oddly enough I haven’t touched this code and now the form is submitting fine without an error, I have no idea what was causing it for that short time, as it was working for a while before I started getting the error and now it’s working again. On another note though, I’m having some other problems with this code. The issue is with the

{if duplicate}...{if:else}...{/if} 
portion of the template. What is happening is as soon as one of the users has posted a review, all of the users get the duplicate message regardless of whether or not they have posted a review. I have also tried using the
{if first_rating}...{/if} 

instead, and it gives the exact same problem. I’ve read over all of the documentation again and again and I cannot see what the issue is. Please help!

Avatar
RankRankRankRankRank

Total Posts: 13708

Joined: Oct 18, 2006

PM

Ignore

 

Conor,

It sounds like you’re caching your template. If you are, can you disable it? smile

Signature

Rank

Total Posts: 12

Joined: Jul 10, 2008

PM

Ignore

 

Caching is not enabled on any of my templates. Any other ideas?

Avatar
RankRankRankRankRank

Total Posts: 13708

Joined: Oct 18, 2006

PM

Ignore

 

Hmmm… it sounds exactly like a caching issue. Do you mind if I log into your CP to have a look? smile
You can PM me login details.

Signature