Magento Upgrade 1.5 to 1.7 - Dashboard Missing - magento

I tried upgrading my magento from 1.5 to 1.7 and my database is now not showing. I followed a simple process:
1) Replicate database
2) Create new folder with Magento 1.7 files
3) I altered one line in config.xml as follows:
SET NAMES utf8
to this
SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0; SET UNIQUE_CHECKS=0;
I was following the suggestion of many others, in order to avoid getting Integrity Constraint violations during upgrade (which I had received on previous attempts).
4) I copied over extensions and themes from old installation to new installation
5) I ran the new Magento instance. I inserted database information for new database
6) I waited a very long time for magento to run database upgrades.
I came across two errors listed below. Error #1 disappeared after the first time:
a:5:{i:0;s:238:"Error in file: "/chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-1' for key 2";i:1;s:1196:"#0 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.4.0.0.14', '1.6.2.0.1')
#2 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.4.0.0.14', '1.6.2.0.1')
#3 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /chroot/home/africanb/dev.mydomain.com/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /chroot/home/africanb/dev.mydomain.com/html/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:36:"/index.php/install/wizard/installDb/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
Error #2 I had to remedy:
a:5:{i:0;s:264:"Error in file: "/chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'report_viewed_product_aggregated_daily' already exists";i:1;s:1188:"#0 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.7.10', '1.6.0.0.1')
#2 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.7.10', '1.6.0.0.1')
#3 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /chroot/home/africanb/dev.mydomain.com/html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /chroot/home/africanb/dev.mydomain.com/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /chroot/home/africanb/dev.mydomain.com/html/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
In order to get passed error #2, i deleted three tables: report_viewed_product_aggregated_daily
report_viewed_product_aggregated_monthly
report_viewed_product_aggregated_yearly
Now, my dashboard is not showing. I basically have a blank page (below the Magento menu, and store chooser). I checked the error logs but could not find anything. I tried flushing cache and reindexing, but still no luck.
Any ideas what the problem might be?

Can you please check the file permissions of dashboard-head.html to verify the server can read it.
Also please enable template path hints for the back-end and report what you see for the dashboard. Information on how to enable can be
found here: http://magebase.com/magento-tutorials/quick-tip-template-hints-for-the-magento-admin-area/
And also for more to detail solution you can refer it LINK
let me know if i can help you more.

Related

Artisan won't work in production but works fine locally

I am pulling my hair out over a problem in production: I cannot get my migrations to run. And, not only that but simply running 'php artisan' generates an error. The odd thing is that everything is working fine locally.
I am using Laravel 5.1 and have tried re-cloning my app on the server, re-installing vendor (after flushing the composer cache), redoing .env and giving permissions to the appropriate bootstrap/cache and storage files. I have also manually dropped all of my tables and then, when that didn't work, deleted and remade the database itself. I have run 'composer dump-autoload' many times as I tried to isolate the source of the problem with no luck.
I had a look at my log file and this is what comes up:
[2016-06-24 06:07:16] production.ERROR: exception 'ErrorException' with message 'Trying to get property of non-object' in /var/www/html/foobooks/app/Services/PrivacyService.php:157
Stack trace:
#0 /var/www/html/foobooks/app/Services/PrivacyService.php(157): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Trying to get p...', '/var/www/html/l...', 157, Array)
#1 /var/www/html/foobooks/app/Services/DateService.php(69): Foobooks\Services\PrivacyService->getPrivacyLevelIdWithPrivacyLevel('everyone')
#2 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(239): Foobooks\Services\DateService->Foobooks\Services\{closure}()
#3 [internal function]: Illuminate\Cache\Repository->rememberForever('everyone_privac...', Object(Closure))
#4 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(318): call_user_func_array(Array, Array)
#5 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Cache\CacheManager->__call('rememberForever', Array)
#6 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Cache\CacheManager->rememberForever('everyone_privac...', Object(Closure))
#7 /var/www/html/foobooks/app/Services/DateService.php(70): Illuminate\Support\Facades\Facade::__callStatic('rememberForever', Array)
#8 /var/www/html/foobooks/app/Services/DateService.php(70): Illuminate\Support\Facades\Cache::rememberForever('everyone_privac...', Object(Closure))
#9 [internal function]: Foobooks\Services\DateService->__construct(Object(Foobooks\Repositories\Models\DbEventRepository), Object(Foobooks\Services\PrivacyService), Object(Foobooks\$
#10 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(780): ReflectionClass->newInstanceArgs(Array)
#11 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('Foobooks\...', Array)
#12 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Foobooks\...', Array)
#13 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(220): Illuminate\Foundation\Application->make('Foobooks\...', Array)
#14 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): Illuminate\Container\Container->Illuminate\Container\{closure}(Object(Illuminate\Foundation\Application), Array)
#15 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build(Object(Closure), Array)
#16 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Foobooks\...', Array)
#17 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('Foobooks\...')
#18 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#19 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Illuminate\Container\Container->getDependencies(Array, Array)
#20 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('Foobooks\...', Array)
#21 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Foobooks\...', Array)
#22 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Console/Application.php(115): Illuminate\Foundation\Application->make('Foobooks\...')
#23 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Console/Application.php(129): Illuminate\Console\Application->resolve('Foobooks\...')
#24 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(226): Illuminate\Console\Application->resolveCommands(Array)
#25 /var/www/html/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Illuminate\Foundation\Console\Kernel->getArtisan()
#26 /var/www/html/foobooks/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 {main}
The app seems to be actually trying to instantiate my class DateService somewhere in the autoload process (which in turn instantiates PrivacyService) and this is what is causing the problem. I have searched my app for all instances where it is injected but none seem to be part of the autoloading process - and, it doesn't explain why things are working just fine locally.
Initially, when artisan complained, it gave me a 'missing base table error' and, for whatever reason, if I 'fake' created the table in database and then dropped it manually, the app moved on to complaining about another table until I did the manual create/drop again. I was able to move through table errors this way until I hit this 'Trying to get property of non-object' error.
Does anyone have any idea what might be the problem? It feels like there is some kind of database caching file that I don't know about that is hanging about somewhere and causing this problem, making the app think the migrations/seeds have already occurred. It just seems odd that creating fake tables and dropping them seemed to be doing something until this error popped up - also, odd that only the production environment is affected.
Any help or insight would be greatly appreciated - thank you!
The solution: for some reason the permissions were different on some folders in my cache folder than others so the flush() method did not fully clear the cache. Legacy folders/files were conflicting with artisan's bootstrapping efforts. I was able to solve the problem by reapplying permissions to the storage/framework/cache directory, running flush() again. Once I did and made sure that ALL subfolders and files were deleted from the cache, I was able to run php artisan without a hitch.

Error Processing Request: dbModel read resource does not implement Zend_Db_Adapter_Abstract

I am using magento 1.9 and today I just edited my local.xml in app/etc/local.xml. I just added some lines like:
<cache>
<backend><![CDATA[memcached]]></backend>
<fast_backend><![CDATA[memcached]]></fast_backend>
<slow_backend>database</slow_backend>
<fast_backend_options>
<servers>
<server>
<host>127.0.0.1</host>
<port>11211</port>
<persistent>1</persistent>
</server>
</servers>
</fast_backend_options>
<prefix><![CDATA[MAGE_]]></prefix>
</cache>
before i did that i backup my local.xml file . When i got a error i uploaded the backup. But it gives me the same error. Please tell me how to fix this.
Error image -
The file i got from error log record. Please tell me how to fix this problem.
a:4:{i:0;s:65:"dbModel read resource does not implement Zend_Db_Adapter_Abstract";i:1;s:1637:
"#0 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(32312): Varien_Data_Collection_Db->setConnection(false)
#1 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(24213): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#2 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(24245): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#3 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#4 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(5882): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#5 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(5887): Mage_Core_Model_Abstract->getResourceCollection()
#6 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(21091): Mage_Core_Model_Abstract->getCollection()
#7 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(20949): Mage_Core_Model_App->_initStores()
#8 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/includes/src/__default.php(20832): Mage_Core_Model_App->_initCurrentStore('', 'store')
#9 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /var/zpanel/hostdata/zadmin/public_html/elawonen_nl/index.php(87): Mage::run('', 'store')
#11 {main}
";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}
Then, I deleted all the files in var/cache. Now, The first page of the website works fine but the product page aren't loading also the backend login page isn't loading. I don't understand what to do.
you can disable the compilation in magento and clear cache then work you store again
here is information in details :
There are two ways in which this can be done:
Via Magento admin
Navigate to System > Tools > Compilation page and click on Disable button
Navigate to System > Cache Management screen and use Flush Cache button.
Via SFTP, by editing the includes/config.php file
To disable compilation in Magento, edit includes/config.php. At around line 28, uncomment the first line and comment out the second:
#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
Via SSH
php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear
Check the status:
# php -f shell/compiler.php -- state
Compiler Status: Disabled
Compilation State: Not Compiled
Collected Files Count: 0
Compiled Scopes Count: 0
Clear the cache:
rm -rf var/cache/* var/session/*
If you are a Create Hosting customer on the Magento Hosting Plan, feel free to submit a support ticket and we can take care of this issue for you.

magento admin assert issue

Error in file: "/home/siddharth/iphp/magento/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php"
- SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_role' already exists
Trace:
#0 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.1.1')
#2 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.1.1')
#3 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/siddharth/iphp/magento/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/siddharth/iphp/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/siddharth/iphp/magento/index.php(87): Mage::run('', 'store')
#8 {main}
1) Go to your localhost or mysql on your server and delete the table that gives error...
2) Clear cookies and refresh that page again
3) Ater 2nd step if same error persist then close the browser and restart it...this will delete all cookies and cache and then hit the url again... do these steps for all errors that come... after this successful completion will be done...

Magento 1.5.1 Installation Error

I receive the following error messages after I set the Base URL and database information. Here is the complete dump:
Error in file: "/var/www/docroot/store/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.0-0.8.1.php" - SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine
Trace:
#0 /var/www/docroot/store/app/code/core/Mage/Core/Model/Resource/Setup.php(390): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /var/www/docroot/store/app/code/core/Mage/Core/Model/Resource/Setup.php(289): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.8.0', '0.8.28')
#2 /var/www/docroot/store/app/code/core/Mage/Core/Model/Resource/Setup.php(233): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.8.0', '0.8.28')
#3 /var/www/docroot/store/app/code/core/Mage/Core/Model/Resource/Setup.php(161): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /var/www/docroot/store/app/code/core/Mage/Core/Model/App.php(399): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /var/www/docroot/store/app/code/core/Mage/Core/Model/App.php(329): Mage_Core_Model_App->_initModules()
#6 /var/www/docroot/store/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#7 /var/www/docroot/store/index.php(81): Mage::run('', 'store')
#8 {main}
I've seen several supposed fixes for similar errors on Google, but none of them have worked. Can anyone help make sense of this?
This Linux System Error Code table reveals, that error 28 corresponds to
28 ENOSPC No space left on device
If you are on a shared host and you are using some global/shared MySQL instance, there is probably not much you can do about it.

Problem with Doctrine_Expression (Doctrine 2) 'There is no open connection'

I have Doctrine2 working fine with my Zend PHP stack.
However if I want to use Doctrine_Expression,
$item->setDateCreated(new Doctrine_Expression('NOW()'));
then I get following error 'There is no open connection'.
This is stack trace:
#0 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Manager.php(264): Doctrine_Manager->getCurrentConnection()
#1 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Expression.php(72): Doctrine_Manager::connection()
#2 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Expression.php(116): Doctrine_Expression->getConnection()
#3 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Expression.php(133): Doctrine_Expression->parseExpression('NOW()')
#4 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Expression.php(89): Doctrine_Expression->parseClause('NOW()')
#5 D:\data\wamp\bin\php\php5.3.5\PEAR\Doctrine\Expression.php(60): Doctrine_Expression->setExpression('NOW()')
#6 D:\data\work\gazette\Projects\NorskTipping\admin-system\code\application\library\MagicHeads\Knalledge\Models\Tagging.php(91): Doctrine_Expression->__construct('NOW()')
...
#14 {main}
I tried to add connection
$item->setDateCreated(new Doctrine_Expression('NOW()', $this->_em->getConnection()));
However, it happens it is connection of type Doctrine\DBAL\Connection while Doctrine_Expression requires Doctrine_Connection
How I can get Doctrine_Connection and provide it to Doctrine_Expression?
Doctrine_Expression is a Doctrine 1 class and can not be used with Doctrine 2. The two versions are very different and not compatible.

Resources