View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005662||OXID eShop (all versions)||4.01. Database handling||public||2014-02-19 13:45||2015-12-01 10:59|
|Product Version||4.7.10 / 5.0.10|
|Target Version||Fixed in Version|
|Summary||0005662: Newly added table field is reported as not found until views are regenerated|
|Description||Adding a new field to some of the db tables (where db views are used e.g. oxcategories) crashes the shop with field not found exception until views are regenerated.|
eShop documentation suggests that view regeneration must be performed every time after new field is added. After the views are regenerated everything works fine. According to current requirements the functionality in this case is correct, however this is more eShop availability concern which is especially important for high load eShops.
Another case where it is important is the moment after creating each 64th subshop. In this case additional fields oxincl and oxexcl are created automatically.
|Steps To Reproduce||1. Add a new field to oxcategories table.|
2. Clean tmp dir.
3. Reload shop - shop is crashed.
|Tags||No tags attached.|
|PHP Version||Not defined|
|MySQL Version||Not defined|
Suggested solution: Take the select column field list from view, but not from actual table, before selecting in eShop in places where the views are used (eg. active record).
The problem is caused by the fact that columns for selection is taken from the table but the actual select is performed on the db view. This is not the problem when column lists from table and the views are synchronized, but is problematic when it is out of sync (the views are not yet gerneated). Taking the column list from the actual select source would be most correct and universal solution, therefore we recommend to use it for the bug fix.