Zen Cart Logo
Forums / Bug Reports / Redirect issue - Manufacturers link

Redirect issue - Manufacturers link

Views: 1,397

Results 1 to 7 of 7
18 Aug 2014, 1:40 PM
#1
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Redirect issue - Manufacturers link

A customer has just reported that clicking on the manufacturers link in the product info pages causes a redirect back to the main index.php page.

I've traced this down as being a piece of code missing from the modules/pages/redirect/header_php.php file in V1.5.3. (The V1.5.2 code is fine).

The 'missing' code in question being:

    case 'url':  if (isset($_GET['goto']) && zen_not_null($_GET['goto'])) {
    zen_redirect('http://' . $_GET['goto']);
  }
  break;

Cheers
RodG

18 Aug 2014, 1:48 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Redirect issue - Manufacturers link

No, that removal was intentional for security reasons.
You'll need to update your template files to use the new syntax for generating manufacturer links.

18 Aug 2014, 1:55 PM
#3
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Redirect issue - Manufacturers link

DrByte:

No, that removal was intentional for security reasons.
You'll need to update your template files to use the new syntax for generating manufacturer links.

I had a gut feeling that that may be the case. I could't find any other info about it though and re-adding the code has taken care of the problem. I guess I now need to go figure out what the new syntax requirements are.

Cheers
RodG

18 Aug 2014, 2:10 PM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Redirect issue - Manufacturers link

lat9:

RodG, see also: http://www.zen-cart.com/showthread.php?213937-Template-Authors-Note-Changes-to-product-s-URL-handling!

Thanks. I'd already managed update the tpl_product_info_display.php file before this came in. The customer doesn't use any other product types or offer free shipping(?) so I don't think I'll bother to rush out and make the changes to the other files.

A bit of a trap for the unwary, and since I'm not a 'Template Author' I guess I didn't take any notice of this thread ;-)

Cheers
RodG

19 Aug 2014, 9:53 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Redirect issue - Manufacturers link

RodG:

A bit of a trap for the unwary
Yes, but easily caught if one engages in a full comparison of old files vs new when doing their upgrade, as per the docs. :)

20 Aug 2014, 11:09 AM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Redirect issue - Manufacturers link

DrByte:

Yes, but easily caught if one engages in a full comparison of old files vs new when doing their upgrade, as per the docs. :)

I don't wish to appear argumentative, but I don't really agree with this.

The changed file **tpl_product_info_display.php **is one of the ZenCart core files that is unlikely to have had user modifications, and the custom template file(s) don't get changed by any ZenCart updates.

This means that in order to identify this problem I would have needed to compare all the zencart core files for changes between ZenCart versions and somehow realise that the changes made to this particular core file would have repercussions for the unchanged template file(s).

This would be a near impossible task in anyones books.

If I'm guilty of doing anything wrong, it would be in not reading the update/doc files for the changes made to zencart (where I assume this change was mentioned).

Cheers
RodG.