CMS MADE SIMPLE FORGE

Products

 

[#8132] problem withg function can_do_pretty and default action

avatar
Created By: yann lamy (snatch1974)
Date Submitted: Thu Jul 12 08:45:56 -0400 2012

Assigned To: Robert Campbell (calguy1000)
Version: 2.18.2
CMSMS Version: None
Severity: Critical
Resolution: Fixed
State: Closed
Summary:
problem withg function can_do_pretty and default action
Detailed Description:
in the class.product_utils.php code we can find the function can_do_pretty witch
is waiting 2 différents paramameters: $action and $params
in the action.default.php code wur can find this:

$pretty_url = '';
  if( product_utils::can_do_pretty($params['notpretty']) ) {
    $prettyurl = product_ops::pretty_url($row['id'],$detailpage);
  }

so only one parameter is send and and error appear on frontend. this error says
that the second parameter for can_do_pretty is less.

i modifyed the the code in action.default.php with this:

$pretty_url = '';
  if( product_utils::can_do_pretty('default', $params['notpretty']) ) {
    $prettyurl = product_ops::pretty_url($row['id'],$detailpage);
  }

and everything goes right now


History

Comments
avatar
Date: 2012-07-12 09:44
Posted By: Belery Olivier (kube)

Same observation here.

Here is the message thrown by php:

Warning: Missing argument 2 for product_utils::can_do_pretty(), called in
/homez.37/ophethom/www/modules/Products/action.default.php on line 447 and
defined in /homez.37/ophethom/www/modules/Products/lib/class.product_utils.php
on line 344


      
avatar
Date: 2012-07-30 07:55
Posted By: James Davies (JimboDavies)

I had the same problem - used your fix as above and it seems to be working fine.

A google search for that error code throws up several sites running CMSMS with
the same issue.
      
avatar
Date: 2012-12-01 19:44
Posted By: Robert Campbell (calguy1000)

fixed this already.
      
Updates

Updated: 2013-09-05 18:14
cmsms_version_id: 29495 => -1
state: Open => Closed

Updated: 2012-12-01 19:44
resolution_id: => 7