I just updated to 2.8 and ran the update.php but return the following error.
Now I cannot change or add any new image styles.
The error indicate that I need to make the square_thumbnail but I am not able to to do this.
After the update.php was run I got this:
Update #7227
Failed: PDOException: SQLSTATE[HY000]: General error: 1364 Field 'isid' doesn't have a default value: INSERT INTO {image_styles} (name, label) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => square_thumbnail [:db_insert_placeholder_1] => square_thumbnail ) in drupal_write_record() (line 7383 of /var/www/xxxxxxx/includes/common.inc).
If I try to make the square_thumbnail now it get the following:
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'isid' doesn't have a default value: INSERT INTO {image_styles} (name, label) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => square_thumbnail [:db_insert_placeholder_1] => square_thumbnail ) in drupal_write_record() (line 7383 of /var/www/xxxxxx/includes/common.inc).
The site is using a MySQL database.
The last update of the module is done on June 16, so I assume the patches above is done?
Hope someone is able to help on this one.
Comments
Comment #2
joseph.olstadUpdated from which previous release?
Try manually deleting square_thumbnail image style found in admin/config/media/image-styles
Click on square_thumbnail and delete it. Then retry upgrade
You may need to also then recreate square_thumbnail image style , suggest 180px by 180px. Unless already correct after upgrade
Comment #3
jens peter commentedI cannot delete square_thumbnail as this type do not exists and I cannot make it.
I cannot correct, change or make any styles - all attempts give me the second error.
I am not sure what version I updated from but I think I ran the last update in the start of 2017.
I could try and upgrade to a version before 2.3 but there are so many to choose from.
Comment #4
joseph.olstadThis error says that there is no default value for isid on the image_styles table, meaning your schema (image_styles) table lacks a default or more likely, there should not be a default for an ID column such as isid. isid is a unique id or should be. More info: the image module is a core module, for a similar workaround/fix see https://drupal.org/node/1428176
Comment #5
joseph.olstadComment #6
joseph.olstadWe haven't seen other reports of this issue. Hard to say if this is a bug yet. Wait and see if others upgrading from 1.x report this; between 10000 and 20000 media 1.x to 2.x upgrades have been performed since 7.x-2.0 was released. Very few reported issues. None like this. This is why I say, wait and see. I could try myself doing a 7.x-1.6 to 7.x-2.8 upgrade, last time I tested that upgrade was I think 7.x-1.6 to 7.x-2.3 and it went fine easy as pie.
Comment #7
joseph.olstadQu'est ce qu'un default fait sur un champ unique***EDIT*** frustrationComment #8
jens peter commentedI didn't update from version 1. That I know for sure.
I do not understand the last question. I made an update that didn't work.
Now images styles are locked.
I have not done anything with fields.
Comment #9
joseph.olstadcan you log into mysql and type this:
describe image_styles;mysql> describe image_styles;Does your image_styles table look similar to this?
Comment #10
joseph.olstadI suspect that you've got multiple copies of the media module on your filesystem.
To diagnose your system, it would be recommended to run the duplicate module finder module to find the duplicate copies. You should then remove the 'extra' copies of the modules.
https://www.drupal.org/project/dmf
Comment #11
joseph.olstadComment #12
joseph.olstadwithout feedback there's not much we can do here.
Comment #13
jens peter commentedI do have other projects going so was not able to reply before today :-) No other modules support reply this fast, so I was not perperred for it.
Tomorrow I am leaving for a 2 week holiday so will not be able to follow up towards you on this before on my return.
I have looked in my database.
I has a different layout (phpMyAdmin) but there are 4 image styles.
Each has a number (isid) going from 1 to 4.
I cannot see any of them being primary.
There is no square_thumbnail - as that is not being created and when I try to do it manually it do not allow me.
I have tested for having the module two times but it is of cause not there anymore than one time.
I will test some more as this site was a copy that was moved from one domain to another - I wounder if there can be some parts pointing to the old location and this might be the problem.
I don't think so as I have moved sites many times before, but it is an idea I can look into.
Any other ideas would be very welcome.
Comment #14
jens peter commentedComment #15
joseph.olstadplease run the command in phpMyAdmin
use drupalDatabaseNameForJensPeterSystems;describe image_styles;compare it with the table describe that I did.
if you are using a prefix in your settings php the image_styles table might be called prefix_image_styles
Comment #16
joseph.olstadotherwise try this; install registry_rebuild for drush
and then run
drush rr --fire-bazookaComment #17
joseph.olstadComment #18
joseph.olstadwrong issue
Comment #19
joseph.olstadedit