Question

We are using magento 1.8.1 and hosting it both locally in an iis/mysql environment and also testing in an ubuntu lamp environment, so we can verify it is not an iis issue. It happens on both environments.

I got up to the point of integrating the product listing page, where we want to show product reviews and the product review fonts, so users can give their reviews without clicking on a link to go to a different page to add it. I managed to load the product reviews blocks. At first the form element of the add to product button was mixing up with the product review form, which i solved by closing the previous form before starting the review form. I can see in Fiddler the request going through and the action on the form element looks like this

http://localhost/index.php/review/product/post/id/2/

While this will actually make the browser send the request (as seen on fiddler, with the right amount of parameters), the review is never stored in the database, so i cannot see it in the pending reviews part of the admin section. After examining both my store's html source and the online demo, i could see there was a hidden form field on the official demo storing the form_key , which i added since, but it still will not work.

Any hints where to look at?

the whole reviews form block looks like this:

<form action="http://localhost/index.php/review/product/post/id/2/" method="post" id="review-form">
<fieldset class="">
                    <h3>You're reviewing: <span>Powermonkey extreme 2</span></h3>
                        <ul class="form-list">
                <li>
                    <label for="nickname_field" class="required"><em>*</em>Nickname</label>
                    <div class="input-box">
                        <input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="">
                    </div>
                </li>
                <li>
                    <label for="summary_field" class="required"><em>*</em>Summary of Your Review</label>
                    <div class="input-box">
                        <input type="text" name="title" id="summary_field" class="input-text required-entry" value="">
                    </div>
                </li>
                <li>
                    <label for="review_field" class="required"><em>*</em>Review</label>
                    <div class="input-box">
                        <textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"></textarea>
                    </div>
                </li>
            </ul>
        </fieldset>
        <div class="buttons-set">
            <button type="submit" title="Submit Review" class="button"><span><span>Submit Review</span></span></button>
        </div>
</form>
Was it helpful?

Solution

We have the same problem, and I solved it.

Magento has a form key when submitting any information to the database. To generate the form key, add this code:

<?php echo $this->getBlockHtml('formkey') ?> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top