i am stuck with an issue. After upgrading my site from 1.5 to 1.6 i am getting this error

"Fatal error: Undefined class constant 'TYPE_TEXT' in /var..../app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade- on line 49"

Please help me..

1 Answer 1


The line in question is this:

->addColumn('category', Varien_Db_Ddl_Table::TYPE_TEXT, 60, array(

But if you upgraded the code correctly this error should not appear.
As you can see here the constant TYPE_TEXT is defined.
The constant was added in 1.6 and did not exist in 1.5.
My hunch is that you did not upgrade the lib/Varien folder, or you have a copy of the old class Varien_Db_Ddl_Table in your local code pool folder.

  • Thanks Marius.. i have upgraded via magento connect by changing mage - latest to 1.7. Could you advise, is it good to copy all lib/varien from 1.7 to my magento? Could you advise me what should i really do now? Thnks in advnce. Commented Oct 10, 2014 at 8:16
  • Get a clean copy of the version you want to use and copy it over your magento instance. Override all the files if needed. Just don't do this on a live env. Backup first.
    – Marius
    Commented Oct 10, 2014 at 8:23
  • Thanks Marius.. so copying lib/varien folder along needed or copying all files from lib? Please advise. Commented Oct 10, 2014 at 8:26
  • Copy ALL files from lib. There might be other changes that you need for the new version.
    – Marius
    Commented Oct 10, 2014 at 8:26
  • Yes..i did what you told.. but i now get with this eror: Fatal error: Call to undefined method Mage_XmlConnect_Model_Resource_Setup::getIdxName() in /var/../app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade- on line 60. I have replaced all lib folders. Commented Oct 10, 2014 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.