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

Assigned to:Anonymous» NancyDru
Status:active» fixed

Fix committed.

#2

Version:5.x-1.x-dev» 5.x-1.0
Status:fixed» active

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

Status:active» fixed

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

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.