Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000163 [phpBBGarage] MCP crash always 2009-07-28 11:34 2009-07-28 14:12
Reporter Beda View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 2.0.B4
  Target Version Product Build
Summary 0000163: During approval of product when you want edit Title of product you will get SQL crash.
Description During approval of product when you want edit Title of product you will get SQL crash after click on Update Btn.

Problem is in mcp_garage.php function

/**
            * Update moderated product and redirect to unapproved list
            */
            case 'update_product':

                /**
                * Check authorisation to perform action, redirecting to error screen if not
                */
                if (!$auth->acl_get('m_garage_edit'))
                {
                    redirect(append_sid("{$phpbb_root_path}garage.$phpEx", "mode=error&EID=14"));
                }

                /**
                * Get all required/optional data
                */
                $params = array('id' => '', 'category_id' => '', 'manufacturer_id' => '');
                $data = $garage->process_vars($params);
                $params = array('title' => '');
                $data += $garage->process_mb_vars($params);

                /**
                * Check required data is present
                */
                $params = array('id', 'title', 'category_id', 'manufacturer_id');
                $garage->check_required_vars($params);

                /**
                * Perform required DB work to update product
                */
                $garage_modification->update_product($data);

                redirect(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=garage&mode=unapproved_products"));
            break;
Steps To Reproduce
Additional Information Sollution is this:

case 'update_product':

                /**
                * Check authorisation to perform action, redirecting to error screen if not
                */
                if (!$auth->acl_get('m_garage_edit'))
                {
                    redirect(append_sid("{$phpbb_root_path}garage.$phpEx", "mode=error&EID=14"));
                }

                /**
                * Get all required/optional data
                */
                $params = array('product_id' => 'id', 'category_id' => '', 'manufacturer_id' => '');
                $data = $garage->process_vars($params);
                $params = array('title' => '');
                $data += $garage->process_mb_vars($params);

                /**
                * Check required data is present
                */
                $params = array('product_id', 'title', 'category_id', 'manufacturer_id');
                $garage->check_required_vars($params);

                /**
                * Perform required DB work to update product
                */
                $garage_modification->update_product($data);

                redirect(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=garage&mode=unapproved_products"));
            break;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000336)
Beda (reporter)
2009-07-28 11:48

SORRY THE SOLLUTION IS WRONG MY MISTAKE !!! DO NOT DO IT !!! :-(

ADMIN PLEASE DELETE Additional Information !
(0000337)
Beda (reporter)
2009-07-28 14:12

RIGHT SOLLUTION IS THIS:

OPEN mcp_garage.php

FIND
case 'update_product':

FIND
$params = array('id' => '', 'category_id' => '', 'manufacturer_id' => '');

REPLACE WITH
$params = array('product_id' => '', 'category_id' => '', 'manufacturer_id' => '');


FIND
$params = array('id', 'title', 'category_id', 'manufacturer_id');

REPLACE WITH
$params = array('product_id', 'title', 'category_id', 'manufacturer_id');




OPEN mcp_garage.html

FIND
<input type="hidden" name="id" value="{PRODUCT_ID}" />

REPLACE WITH
<input type="hidden" name="product_id" value="{PRODUCT_ID}" />

- Issue History
Date Modified Username Field Change
2009-07-28 11:34 Beda New Issue
2009-07-28 11:48 Beda Note Added: 0000336
2009-07-28 14:12 Beda Note Added: 0000337
cron