My client wanted to change the theme on an existing Drupal 7x website and Media is one of the depended modules. After I installed Media 7x.1-5 I got several errors.
1) Installation fails with SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.media_type' doesn't exist
Which I resolved by importing the table from http://pastebin.com/cf4bBjjE
2) PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'databasename.media_filter_usage' doesn't exist
Which I resolved by importing another table according to #3 on https://www.drupal.org/node/2081695
3) Then I got the error PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.image_dimensions' doesn't exist:
and I rolled back to Media 1.3 which I still had on my harddrive. It one of the solutions offered at https://www.drupal.org/node/2170231
But now I am getting white screens only, and I am not sure what to do next.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2473203-fix-update-7002.patch | 1.17 KB | Dave Reid |
#5 | errors_after_installing-2473203-5.patch | 2.38 KB | javivf |
#1 | media.patch | 566 bytes | javivf |
Comments
Comment #1
javivf CreditAttribution: javivf as a volunteer commentedI think this patch solve the issue, can you review it?
Comment #2
javivf CreditAttribution: javivf as a volunteer commentedComment #4
David Hernández CreditAttribution: David Hernández as a volunteer commentedInstead of updating an existing hook_update_X, I think it will be better to create a new update_X function. Because the people who has already executed the update, will not resolve the issue after updating or applying the patch.
Comment #5
javivf CreditAttribution: javivf as a volunteer commentedDone changes as suggested
Comment #6
David Hernández CreditAttribution: David Hernández as a volunteer commentedEverything looks correct from here.
Still, I don't feel like this is a nice solution. But at least it works. Let's wait for the maintainer to give a final veredict about this.
There is only a little problem, but is not important:
Missing newline at the end of the file.
Comment #7
Dave ReidRevised and cleaned up, allowing us to re-use the existing update hook function.
Comment #8
Dave ReidComment #9
Dave ReidCommitted #8 to 7.x-1.x.
Comment #11
Dave ReidAlso added the update hook to 7.x-2.x, just in case.