View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006450 | OXID eShop (all versions) | 2.2. Shop settings | public | 2016-07-13 15:15 | 2024-03-20 11:16 |
Reporter | matths | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | independent | OS | independent | OS Version | independent |
Product Version | 4.10.0 / 5.3.0 | ||||
Fixed in Version | 6.0.0-beta.1 | ||||
Summary | 0006450: Creation of empty fields in payments | ||||
Description | Users of the OXID Admin UI tend to just hit the Enter key to save a form. When not using the "Save" button but instead hitting the Enter key, an invisible form field for the selected payment is created. This can lead to unexpected results in the frontend as the admin user can't see the fields wihtout title easily. | ||||
Steps To Reproduce | Go to SHOP SETTINGS > Payment Methods > e.g. Invoice Klick into an input field in the lower part of the screen. Hit enter to save / submit the form. Now click into the fields select box. You can select an "invisible" field with an empty name. | ||||
Additional Information | In the payment_main.tpl there are two <input type="submit">. When the user hits enter key, the browser uses the first submit input field to actually submit the form. Thus the method addField() instead of save() is called, which does not check for an empty value of oxRegistry::getConfig()->getRequestParameter("sAddField") and thus creates fields with no name which are "invisible" to the admin user, but might create visible fields in the checkout process for frontend users depending on the templates. | ||||
Tags | Solution Provided | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | Google Chrome | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
A simply workaround is to overwrite the method and checking for empty fields before adding those. public function addField() { $sAddField = oxRegistry::getConfig()->getRequestParameter("sAddField"); if ($sAddField!="") { return parent::addField(); } return $this->save(); } |
|
https://github.com/OXID-eSales/oxideshop_ce/pull/434 |