View Issue Details

IDProjectCategoryView StatusLast Update
0005662OXID eShop (all versions)4.01. Database handlingpublic2015-12-01 10:59
Status acknowledgedResolutionopen 
Product Version4.7.10 / 5.0.10 
Target VersionFixed in Version 
Summary0005662: Newly added table field is reported as not found until views are regenerated
DescriptionAdding 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 Reproduce1. Add a new field to oxcategories table.
2. Clean tmp dir.
3. Reload shop - shop is crashed.
TagsNo tags attached.
ThemeNot defined
PHP VersionNot defined
MySQL VersionNot defined



2014-02-19 16:44

reporter   ~0009535

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.