View Issue Details

IDProjectCategoryView StatusLast Update
0005662OXID eShop (all versions)4.01. Database handlingpublic2023-11-24 13:41
Reportertomas_liubinas Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version4.7.10 / 5.0.10 
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.
TagsInternationalization Rework
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

tomas_liubinas

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.

Sven Brunk

2023-11-24 13:41

administrator   ~0015938

Right. It is like that and it is documented like that. We will try to get rid of the views soon, but until then the system behaves as planned and documented.