Fatal error: Unsupported operand types in /home/ecodev/public_html/sites/all/modules/entity/views/entity.views.inc on line 189
Drush command terminated abnormally due to an unrecoverable error.
After having this problem, I totally removed Commerce, including un install, and all %commerce% tables removed and cache cleared as describe in #858722. I also found some "field_delete_field" related to commerce and removed them (after reviewing #943772).
I reinstalled commerce 7.x-1.2 and commerce_repair 7.x-1.x-dev (2011-Sep-09). As instructed in #1007434 I enabled the components Commerce and Commerce UI + Customer and Customer UI + Price + Line Item and Line Item UI with no problem. I then ran commerce_repair and clear cache (drush cc=1).
When trying to enable order, the error appear again and the web fail.
After restoring from a backup I made just before enabling order, I was able to enable Product and Product UI.
Enabling Product reference cause another error:
WD php: FieldException: Attempt to create field name commerce_product[error]
which already exists, although it is inactive. in
field_create_field() (line 85 of
/home/ecodev/public_html/modules/field/field.crud.inc).
Cannot modify header information - headers already sent by (output [warning]
started at /usr/share/drush/includes/output.inc:37)
bootstrap.inc:1251
FieldException: Attempt to create field name <em class="placeholder">commerce_product</em> which already exists, although it is inactive. in field_create_field() (line 85 of /home/ecodev/public_html/modules/field/field.crud.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
But the website is fine.
The other modules I have installed are:
- Address Field 1.0-beta2
- Chaos tool suite 1.0-rc1
- Entity API 1.0-rc1+43-dev
- Rules 2.0
- Views 3.3
Comments
Comment #1
rszrama commentedDeleting manually is always fraught with peril. It sounds like you have fields that weren't deleted that are causing problems now on re-installation. Any field prefixed with commerce_ instead of field_ was added by a Drupal Commerce module and will be recreated when the module is installed. Now, it actually does check to ensure a field doesn't exist before creating again, but if you disabled a module and that resulted in a field being disabled, we have an open issue that I'll link to from here where we need to accommodate that scenario still. In the meantime, I'll mark this one as a duplicate for that issue.
See #1361562: Re-enabling Commerce causes a PHP Fatal Error.
As to the original bug you encountered, I think you would've been better off to figure out why you were getting that error before nuking the database. I've never seen any errors with respect to the Views integration in Entity API, so who knows what could've been wrong. : ?
Comment #2
shaisamuel commentedThank for the help. This was the case before I deleted anything. I couldn't get order to be re-activate after I de-activate it at the first place. I thought that clearing out commerce of my db will allow fresh install. Any suggestion how to clear it all out and restart?
Comment #3
shaisamuel commentedSOLUTION !!!
After straggling with this many weeks, I finally found a solution which work and managed to cleanly remove commerce (!) and get it to reinstall and activate all its component !!!
I know it is not a clean way, since you need to mess with the DB, but in fact, it is a big issue for many. I found a script which I modified to do all of the above with some addition and it works.
I wish, someone with more knowledge than me, best some commerce guy, will use it to create an uninstall option from commerce, until all the loss ends will come together.
Basically I combined #858722: Cannot reinstall Commerce modules after uninstall due to field deletion failure by improving a script I found in
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cts=13317....
Here is the process step by step:
1. Disable commerce components one by one or using a single drush command
drush pm-disable commerce2. Uninstall commerce components one by one (if possible). Drush currently can't do it in a single command.
3. Delete folder sites/all/modules/commerce
4. Create a php file under your drupal directory, with a name commerce_cleanup_script.php
5. Paste the following code into it, after replacing myDBname, myDBuser, myDBpass with your DB name, user and password.
6. In SQl run the following command: show tables like '%commerce%';
7. Drop each if the tables in the list (if still exists).
8. Clear ALL cache (using Drush cc).
Backup your DB which is clean of commerce.
Reinstall commerce, its an incredible module.
Hope it helps.
Comment #4
keva commentedThank you, shaisamuel! It works.
Comment #5
drupalerocant commentedThanks for the instructions, shaisamuel
I tried following them step by step, after executing the script, this was the output:
I followed the correct order for installation and after enabling order and order UI it gave me the following error:
and I couldn't finish my commerce installation.
I guess there has been some problem with the script, but I cannot identify it.
Comment #6
drupalerocant commentedWell, finally I figured it out. The problem was I was trying to install order not being user 1.
I ran commerce_repair module as a user 1, and finally everything went fine.
Thanks for the instructions!
Comment #7
cleaver commentedI've been able to work around this problem by patching entity.views.inc
See: #2136919: Unsupported operand types in entity.views.inc when property info is missing.
Comment #8
cleaver commentedCan be resolved with patch: #2122389: Views handler not working properly throwing warnings at cache flushing...
Comment #9
joelpittet@cleaver isn't the patch at #2136919: Unsupported operand types in entity.views.inc when property info is missing.?