Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with Categories (and sub cats.) on clean MS2.2ms2


fiscus

Recommended Posts

I have just installed a clean MS2.2ms2 - everything went fine.

 

I have started setting up everything in Admin - and everything is going through fine - no errors - no problems.

 

I have deleted all the default categories and setup my zones and changed the default currency to AUD.

 

I can create Categories in Catalog fine - however when I click on the Top Category to make a subcategory i get an error :

 

Fatal error: Call to undefined function: array_map() in /blah/blah/blah/catalog/admin/includes/functions/general.php on line 1293

 

I have re-upped the general.php from the original zip and I am still getting the same error. Any ideas?

Link to comment
Share on other sites

for a bit more info, line 1293 is

 

// Parse and secure the cPath parameter values

function tep_parse_category_path($cPath) {

// make sure the category IDs are integers

$cPath_array = array_map('tep_string_to_int', explode('_', $cPath));

Link to comment
Share on other sites

reloading the files will not help, you need to take the code from catalog/includes/functions/compatability.php

  if (!function_exists('array_map')) {

   function array_map($callback, $array) {

     if (is_array($array)) {

       $_new_array = array();

       reset($array);

       while (list($key, $value) = each($array)) {

         $_new_array[$key] = array_map($callback, $array[$key]);

       }

       return $_new_array;

     } else {

       return $callback($array);

     }

   }

 }

and place it in admin/includes/functions/compatability.php

 

This appears to be an oversite on the developers part, hopefully a developer will notice this and correct it.

Link to comment
Share on other sites

  • 3 weeks later...

HI guys.

 

Not sure if my problem is related or if you could help me with this problem i have with my categories and sub categories.

I had installed the contribution and i was able to creat new categories and subcategories, so all is well with that, i still do have the default 3 categories, with sub categories. When i view them on the site, i can see all the categories in my header and only the subcategories of the default 3 categories the subcategories i had created i am not able to see them.. could anyone shed some help here.

 

thanks

P.

Link to comment
Share on other sites

  • 3 weeks later...

Pasting that code just gave me new errors in addition to the original error:

 

Parse error : parse error in /usr/local/etc/httpd/vhosts/www.temp.com/htdocs/catalog/admin/includes/functions/compatibility.php on line 138

 

Warning : Cannot send session cache limiter - headers already sent (output started at /usr/local/etc/httpd/vhosts/www.temp.com/htdocs/catalog/admin/includes/functions/compatibility.php:138) in /usr/local/etc/httpd/vhosts/www.temp.com/htdocs/catalog/admin/includes/functions/sessions.php on line 67

 

Fatal error : Call to undefined function: array_map() in /usr/local/etc/httpd/vhosts/www.temp.com/htdocs/catalog/admin/includes/functions/general.php on line 1293

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...