Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've tried installing and uninstalling on my dev site and live site about 10 times, going so far as to disable 75% of the other modules, and it just won't create the opengraph_meta table in the database. The module seems to work, using the default settings, but it throws PHP errors on every page load because the table doesn't exist.
Anyone have any ideas? Not familiar enough with MySQL to manually create the table myself. . . .
Comment | File | Size | Author |
---|---|---|---|
#2 | 1151668-schema.patch | 1.02 KB | Jorrit |
Comments
Comment #1
DanieGrabe CreditAttribution: DanieGrabe commentedFound this here in another issue:
CREATE TABLE IF NOT EXISTS `opengraph_meta` (
`nid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`description` longtext NOT NULL,
`image` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`optional` text,
PRIMARY KEY (`nid`)
)
I know its late - maybe this helps....
Comment #2
Jorrit CreditAttribution: Jorrit commentedThe problem is that the code that generates the database table contains an error: text columns should not have a default value. The Drupal 7 version is not affected. I have attached a patch to fix this problem.
I am changing this bug to major because the bug prevents people from installing this module.
Comment #3
hiddentao CreditAttribution: hiddentao commentedFixed in 6.x-1.x dev.
Comment #4
hiddentao CreditAttribution: hiddentao commentedPatched in 6.x-1.x-dev.
Comment #5
doublejosh CreditAttribution: doublejosh commentedRather strangely this caused a problem for us on production, but not when we installed and tested on dev and staging.
Are there perhaps some DB configurations that would allow the install/create script to work?
Comment #6
Jorrit CreditAttribution: Jorrit commentedMaybe MySQL has some strictness levels that allow the faulty SQL. By the way hiddentao: this bug does not exist in 7.x.
Comment #7
doublejosh CreditAttribution: doublejosh commentedMay be worth mentioning that the "faulty mySQL" is longtext with a default value.
Comment #8
doublejosh CreditAttribution: doublejosh commentedInterestingly enough the install script uses a schema DB abstraction object that seems like the right way to do it.
Looks like it's just the description column's
'default' => '',
entry, which probably came from a module builder :)Perhaps someone more familiar with that structure could shed some light on how to do this properly?
Comment #9
hiddentao CreditAttribution: hiddentao commentedI've gotten rid of the
'default' => ''
line in both 6.x and 7.x now. Fixed in dev.Comment #10
hiddentao CreditAttribution: hiddentao commentedComment #11
doublejosh CreditAttribution: doublejosh commentedCool. thanks so much.
Might as well document this is related to the sql-mode...
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_stri...