View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006557 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2016-11-30 14:01 | 2016-12-09 09:59 |
Reporter | dmitrijus.druteika | Assigned To | |||
Priority | urgent | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 6.0.0-beta.1 | ||||
Fixed in Version | 6.0.0-beta.2 | ||||
Summary | 0006557: Namespaces conflict of "Payment" model VS controller in modules "extend" classes | ||||
Description | When a module overloads "Payment" controller using metadata "extend" section, and this controller is called in any way, there is a fatal PHP error: "Fatal error: Cannot redeclare class OxidEsales\EshopCommunity\Application\Model\Payment in /var/www/oxideshop/source/Application/Model/payment.php on line 0" NOTE: Error refers to model, but is triggered by controller call. NOTE: In path /var/www/oxideshop/source/Application/Model/payment.php - file name is lowercase - as for controller, but rest of path is model. IMPORTANT NOTE: Please also check other classes where model and controller names without namespaces are the same! | ||||
Steps To Reproduce | Two real examples: 1. Activate Paymorrow module and go to checkout payment stem - the error is shown. 2. In Modules Generator try to create a module with "Payment" in section "Extend classes" - the error is shown. So, as descriptions says, if there is a module which extends "Payment" controller - this error would trigger! Sample code from metadata: ... 'extend' => array( ... 'payment' => 'oxps/paymorrow/controllers/oxpspaymorrowpayment', ... Sample code from the extend class: ... class OxpsPaymorrowPayment extends OxpsPaymorrowPayment_parent { ... | ||||
Additional Information | Why important? - Examples from "Steps To Reproduce" are parts of OXID - eFile and SDK extensions and both fails due to this error - Same would happen to each payment module! Because all payment module extend "Payment" controller - Same issue might happen to other classes where model and controller names without namespaces are the same | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
related to | 0006558 | resolved | saulius.stasiukaitis | Unable to access directly controllers, which are defined in module "extend" section |