I decided to partially create a new database and basically move the updated tables back over to the original.
I looked around everywhere but could not find a direct solution. I have 5000+ products deeply categorized and needed to preserve my old database. This solution may have the side effect of needing to research the wishlist and customer logs for some, but this was not a problem for us. Posting on here since I had so much trouble finding any solution at all to this issue.
In regard to the error generated by a non-object calling SetRenderer() in ‘ Account.php on line 77 ‘ when editing/adding new customer accounts in the backend. This also fixed the issue of customers not being able to login and not being able to register with the form errors:
First Name cannot be empty
Last Name cannot be empty
Invalid email address
The issue only presents itself on sites which have performed an upgrade from one Magento version to another. I went clear from 1.3.1 to 1.9.0 and, in theory, this should work for anyone in between.
How to solve:
--Step 1: Create a temporary Magento installation at the same version you upgraded to--
Create a blank Magento install with a separate, empty database. Use the installer for the same version which you upgraded to causing the break. If you want to upgrade further, just continue updates until your main store is at the desired version before doing this.
During the installation copy the encryption key from your main store and give it to the installer.
(I think it is in app/etc/local.xml if you have lost it. Should be in the <crypt></crypt> tag)
In the **fresh installation**, be sure to use the same table prefix as you use in the upgraded installation.
--Step 2: Export your customers--
Go to the Magento admin dashboard in your **broken installation**.
In the menu, go to: System >> Import/Export >> Dataflow - Profiles
Choose the built-in profile ‘Export Customers’.
Choose Run Profile and follow the form buttons to start exporting customers.
--Step 3: Migrate the exported customer file to new install--
FTP, SSH or use a File Manager to get into the Magneto directory for your **broken installation**
From there, navigate to /var/export/export_customers.csv and download this file
Similarly, logout and FTP, SSH or use a File Manager to get into the Magento directory for your newly made **fresh installation**.
Navigate to /var and create a new directory called ‘import’. This is used by the system but does not exist by default.
Upload the export_customers.csv file into this directory. Alternatively you may do this through the backend in the next step.
--Step 4: Import your customers--
Now login to the admin dashboard of your new **fresh installation**.
As before, in the menu, go to: System >> Import/Export >> Dataflow - Profiles
Select ‘Import Customers’
Note: If you chose upload through the backend, you must make sure the file is uploaded before it will appear in the dropdown.
Select ‘Upload File’ on the left and browse to your export_customers.csv file. Now choose ‘’Save and Continue Edit’ to upload them
On the left choose ‘Run Profile’, if you uploaded the file already to /var/import you should see it in a dropdown list here.
After selecting this file, follow the form button(s) to run the importer.
--Step 5: Verify and Backup Customers--
Check to see that the import ran successfully and you have the same number of customers imported as you expected from your main site.
Using a tool such as HeidiSQL, MySQL Workbench, phpMyAdmin, Adminer or mysqldump via SSH - login to manage both of your databases.
Determine all tables which have the word ‘customer’ in them and export these tables for each database.
For instance, I ended up with two files databasename_main_customers.sql and databasename_temp_customers.sql
I don’t want to clutter the steps too much with info on using these. However, using HeidiSQL all I had to do was select the database I wanted, right click it, choose ‘Export Database as SQL’ and add a check to each table with customers in the name. In phpMyAdmin select your database and choose the Export tab, there will be a select box where you can you control + click to select the customer tables.
I have attached an image of all the tables which I backed up for version 1.9.0
click here for image sorry i can’t seem to find the shortcode for this.
--Step 6: Drop customer tables--
In the **broken installation** only, your main site: drop all the same tables you just made a backup for. (anything with ‘customer’)
For phpMyAdmin, choose your main site’s database and you’ll see a big list. Check off each of these tables and at the bottom you’ll see a dropdown saying ‘With Selected’. Choose drop.
For phpMyAdmin, you probably have to select ‘Disable Foreign Key check’ on the page that comes up next; probably something similar for other tools. I did mine in HeidiSQL and did not have to do this, but it is common.
In either case, make sure those tables are fully dropped, not emptied, from your main store’s database.
--Step 7: Recreate the tables--
Stay or get logged in to you **broken installation’s database** (your main store). Select the appropriate database in whichever tool you use. Find either an import option or anywhere you may run a SQL script from a file.
- Plain MySQL: log in through SSH, use the mysql command, use your database and type ‘source myfile.sql’
- phpMyAdmin: select your main database, choose the ‘Import’ tab or possibly just go to the SQL tab and copy/paste.
- HeidiSQL: select your main database, go to File >> Load SQL file…
Whichever method you use, locate the SQL backup you generated from your **temporary installation’s database**. As mentioned, I named mine ‘databasename_temp_customers.sql’. Select this file and run the SQL.
This will regenerate all the tables you dropped from your main installation, using the corrected data and schema from the temporary installation.
--Step 8: Verify and Test--
Once that has completed, log back into your **main installation’s** admin dashboard. For good measure, you should probably clear all your caches. I re-indexed everything as well, but I don’t think that it was necessary.
Go to Customers >> Manage Customers from the menu. Check that you are now able to select a customer and edit their profile, etc,.. properly. Try to add a new customer from the backend and/or save and revert changes to make sure values are updating correctly.
Go to yoursite.com/customer/account/create/ - Try to register as a new customer and ensure that everything works here.
Go to yoursite.com/customer/account/login/ - Try to login as a registered customer and again ensure that everything works here.
Hopefully by this point, everything should be going smoothly!
--Step 9: Cleanup and Caveats--
Now you can delete your entire **temporary installation’s** database and all of it’s files and directory structure. You’re good to go.
Depending on some factors, this may or may not change some customer ids - I am not entirely sure about that. So -be sure- you made backups of your tables, you might have to deploy them to a temporary database and query them in order to match account names to their old ids. This would allow you to update some tables to reflect their new ids, such as wishlists etc.
Our IDs did not change. It could be that Magento’s export included all the needed information or it could be simply because all the accounts in our database were serialized nicely. Either way you will now have all your customers and their accounts back in business.
To query this, I suggest to perform a join on the backup of your temporary store’s _customer_entity table with the fields from the backup of your main store’s *old* _customer_entity table.
Using `email`, `store_id`, `website_id` and `group_id` you can match unique accounts across both versions and per `entity_id` as for instance join the `entity_id` from the old table to the backup of the temporary install as `old_id`. then you run through your main database and update anywhere there’s a customer entity reference with
and update the reference from `old_id` to `entity_id`.
`entity_id` IN (SELECT `old_id` FROM (your_join_statement) )
Again, we didn’t have to go through that trouble - so hopefully you wont either.
Hi, I tried the solution listed here a earlier but it did not work for me.
I’ve posted a potential solution, though it could be somewhat furthered to update wishlists, here on this post.
email me or find me at approach.im