View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003163 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2011-08-19 14:12 | 2012-12-10 13:44 |
Reporter | csimon | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Summary | 0003163: Impossible to use admin without views | ||||
Description | According some bug entry regarding mysql and views, it was suggested to dump a database without views and regenerate them in admin afterwards. However: This is impossible because there is an error when you try to open admin without having views: " exception 'ADODB_Exception' with message 'mysql error: [1146:xxxxxxxx.oxv_oxcountry_en' doesn't exist]" There has to be a possibility to regenerate views without admin whatsoever. However, since shopowners aren't programmers i suggest to provide a small script somewhere which only calls "updateViews" on oxDb. Maybe there could be an "emergency" admin which oxchkversion and scripts like this. the decision is yours. I attached a small script which is only quick and dirty and of course allowed to adapt ;) | ||||
Steps To Reproduce | Delete views -> try to open admin | ||||
Tags | No tags attached. | ||||
Attached Files | tc_update_views.php (356 bytes)
<?php function getShopBasePath() { return dirname(__FILE__) . '/'; } function isAdmin() { return false; } // custom functions file include getShopBasePath() . 'modules/functions.php'; // Generic utility method file require_once getShopBasePath() . 'core/oxfunctions.php'; $config = oxConfig::getInstance(); oxDb::getInstance()->updateViews(); | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
related to | 0002743 | resolved | alfonsas_cirtautas | mysqldump does not work with many languages |
|
We will discuss internaly about the best way to solve it and how to deliver that kind of solutions (as separate scripts or with eShop with restricted access, etc.). Having in mind that in future this tool may contain also other features for rescue actions (like disabling modules or so). |
|
You know about the script provided in forums to edit module emtries via frontend? http://wiki.oxidforge.org/Tutorials/en/edit-Module-entries-via-Frontend |
|
This maybe some module causing this, i recreated views in admin several times without problems. However, an "emergency admin" is a very good idea. |
|
leofonic could be right, if some module is selecting a view from database - which is always the case if you use getSelectFields or getViewName - which extends a class which is loaded in admin (e.g. oxuser) then the admin is unusable. however, i think some kind of "safe-mode" which can be enabled in config.inc.php would be neat, even if this is not really a "bug" :) |
|
use config option blSkipViewUsage in config.inc.php add it to config file, set value true login to admin regenerate view remove config option |