You are here:  » Review issue

Support Forum



Review issue

Submitted by amplidyne on Sun, 2008-01-27 22:47 in

David,
I am having some problem entering reviews in through my website. When I select a product and click "review this product", i get the text box and start rating and I can fill out correctly. However, when I press submit button, I get a page that goes to http://www.mydomain.com/&pending=1 and says page not found.

Is there is way to display the text that is coded in rating.php?

Thanks,
MK

Submitted by support on Mon, 2008-01-28 09:56

Hello MK,

I can see what the problem is here - it looks like the $_SERVER variable is not being populated by PHP on your particular installation. $_SERVER["REQUEST_URI"] is used by reviews.php to return to the same page.

To fix this, the variable will need to be constructed manually within the script. Look for the following code (starting at line 19):

    if ($config_useRewrite)
    {
      header("Location: ".$_SERVER["REQUEST_URI"]."?pending=1");
    }
    else
    {
      header("Location: ".$_SERVER["REQUEST_URI"]."&pending=1");
    }

...and change this as follows:

    if ($config_useRewrite)
    {
      $_SERVER["REQUEST_URI"] = $config_baseHREF."review/".tapestry_hyphenate($q).".html";
      header("Location: ".$_SERVER["REQUEST_URI"]."?pending=1");
    }
    else
    {
      $_SERVER["REQUEST_URI"] = $config_baseHREF."reviews.php?q=".urlencode($q);
      header("Location: ".$_SERVER["REQUEST_URI"]."&pending=1");
    }

That should do the trick!
Cheers,
David.

Submitted by amplidyne on Mon, 2008-01-28 16:29

Thanks David! I appreciate your prompt response.

Submitted by amplidyne on Tue, 2008-01-29 11:56

David,
When I add this code it still give me same problem(Page not found).

Now the URL is staying as http://www.yourdomain/reviews.php?q=Bedroom+Furniture+Collection+Piccadilly
and it is not adding &pending=1 at the end.
I was expecting
http://www.yourdomain/reviews.php?q=Bedroom+Furniture+Collection+Piccadilly&pending=1

Thanks,

Submitted by support on Tue, 2008-01-29 12:02

Hi,

After submitting a review; what is in the address bar when it is displaying page not found? Can you copy and paste the invalid URL directly (just changing your domain name if you want)...

There was an error in my original post, in that I had review.php instead of reviews.php, but it looks like you may have already corrected that. If not, please copy from the modification above again which should now redirect to the correct URL...

Cheers,
David.

Submitted by amplidyne on Tue, 2008-01-29 14:36

David,
Address bar doesn't change after I click submit button. It stays as it was on the review page.
For example, this is what I had in address bar on review page and it didn't change after submit but page got refreshed to "PAGE NOT FOUND?

http://www.yourdomain.com/reviews.php?q=Bedroom+Furniture+Collection+Piccadilly

Thanks for your help.

Submitted by support on Tue, 2008-01-29 15:07

Hi,

Could you email me a link to your site so that I can take a look and try to work out what's going on? Reply to your reg code or forum registration email is the easiest way to get me...

Cheers,
David.

Submitted by redspark on Mon, 2009-06-22 20:22

Hi David,

I had the same problem with the reviews and i changed the code as mentioned on top. But now i get a 502 bad gateway error. When i look in the admin, there are over 400 reviews pending (all from the same request)

Do you know what is going on?

regardsm

B.

Submitted by support on Tue, 2009-06-23 07:55

Hi,

Could you email me your modified reviews.php and i'll take a look for you...

Cheers,
David.