Upgrade from 1.2.0 to 1.5.1 Error

I upgraded from 1.2.0 to 1.5.1 and received the following error.

Application Execution ExceptionError Type: org.hibernate.QueryException : [N/A]

Error Messages: could not resolve property: modifiedDate of: cbPage

Any ideas?

Thanks,

Steve

Do you restart your CF/Railo server after the upgrade or run a ORM reload?

Curt

Hi Curt,

I tried reinitializing, restarting CF, and rebooting, but after I log in to the cbadmin, I still get the same message. The site comes up fine and even the cbadmin login comes up fine. It’s just after the login is where the error is displayed.

  • Steve

Steve, maybe the db did not get updated. Look in your DB for the cb_content table. If the FK_authorID is null, then that was the problem.

You can run the following to fix it.

// get all content versions
var qAllContent = new Query();
qAllContent.setSQL(“select distinct FK_authorID, FK_contentID from cb_contentVersion where isActive = 1”);
var qContent = qAllContent.execute().getResult();

// Update creators
for(var x=1; x lte qContent.recordcount; x++ ){

// check uthor not empty
var authCheck = new Query(sql=“SELECT FK_authorID FROM cb_content WHERE contentID = :contentID”);
authCheck.addParam(name=“contentID”, value=qContent.FK_contentID[ x ], cfsqltype=“numeric”);
if( len( authCheck.execute().getResult().FK_authorID ) ){
//log.info(“Skipping creator for content id #qContent.FK_contentID[ x ]# as it is already set.”);
continue;
};

var q = new Query();
q.setSQL( “UPDATE cb_content SET FK_authorID = :authorID WHERE contentID = :contentID” );
q.addParam(name=“authorID”, value=qContent.FK_authorID[ x ], cfsqltype=“numeric”);
q.addParam(name=“contentID”, value=qContent.FK_contentID[ x ], cfsqltype=“numeric”);
q.execute();
//log.info(“Updated creator for content id #qContent.FK_contentID[ x ]#”);
}

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Luis,

The FK_authorID is populated with ‘1’ for all records, so that’s not the issue.

  • Steve

signature0.jpg

Not sure what was going on, but I checked the database table and it was fine. I still ran Luis’ code, but no change. Funny, though, the second time I booted my computer, viola! It works! Very strange.

  • Steve