Posted by NancyDru on December 14, 2007 at 1:47pm
Jump to:
| Project: | Longer Node Titles |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | NancyDru |
| Status: | closed (fixed) |
Issue Summary
The correct install code should be:
function longer_titles_install() {
$result = db_query("ALTER TABLE {node} CHANGE 'title' VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
$result = db_query("ALTER TABLE {node_revisions} CHANGE 'title' VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");The column name needed to be in quotes. And table names are supposed to be in curly brackets.
Note: you need to change the "node_revisions" table as well.
Comments
#1
Fix committed.
#2
Hi,
It still fails for me. I think the install should be:
function longer_titles_install() {$result = db_query("ALTER TABLE {node} CHANGE 'title' 'title' VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
$result = db_query("ALTER TABLE {node_revisions} CHANGE 'title' 'title' VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
#3
Actually it appears that the quotes should not be there. I removed them and the character set (in case you want something else). It now works correctly for me. The fix has been committed - it will take a few hours to roll up.
function longer_titles_install() {$result = db_query("ALTER TABLE {node} CHANGE title title VARCHAR(255) NOT NULL;");
$result = db_query("ALTER TABLE {node_revisions} CHANGE title title VARCHAR(255) NOT NULL;");
}
#4
Automatically closed -- issue fixed for two weeks with no activity.