Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0


 
Search: 

6: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0
In response to 5 09/18/06 04:58 AM
[ Reply | Forward ]
Ken,

Sorry for not replying earlier but I only just saw this post just before dinner. I think my spam filter was filtering out your postings and I hadn't noticed - I found one in my spam list today.

Anyway, reading this error I suspect either the table names or the the column names in the tool's tables don't match the column names in the *.hbm.xml file. The table at fault is probably your main table.

I've run rename tool and I'll try deploying it and seeing if I can reproduce the error.

Fiona

Posted by Fiona Malikoff

7: Re: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0
In response to 6 09/18/06 05:12 AM
[ Reply | Forward ]
Can't reproduce the problem I'm afraid. I've run the rename with the configuration you gave and I did deploy-tool, ran JBOSS, logged in and opened up the authoring screen without a problem.

Can you attach a zip of your source files?

Fiona

Posted by Fiona Malikoff

8: Re: Re: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0
In response to 7 09/18/06 05:27 AM
[ Reply | Forward ]
Here is is.

Thanks.

-ken

Posted by Ken Kahn

Attachments:
10: Re: Re: Re: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0
In response to 8 09/18/06 06:01 AM
[ Reply | Forward ]
I've got bad news for you Ken.

You are trying to work with tables based on the submit tool and code based on the noticeboard tool. Unfortunately, the column names across our tools aren't consistent enough to do that. So you have to pick one and stay with it for the data side.

The file db/sql/create_lams_tool_behaviourComposer.sql contains the tables for your tool. It defines tl_kkbc10_content as:

create table tl_kkbc10_content (
  content_id bigint not null,
  title varchar(64) not null,
  instruction text,
  define_later bit not null,
  run_offline bit not null,
  offline_instruction text,
  online_instruction text,
  content_in_use bit,
  lock_on_finished bit,
  primary key (content_id)
);

Now looking at BehaviourComposerContent.hbm.xml (which is the file that maps the tl_kkbc10_content table to a BehaviourComposerContent object, it expects the table to be something like

create table tl_kkbc10_content (
    uid bigint not null,
    content text,
    creator_user_id bigint,
    date_created date,
    date_updated date,
    define_later bit
    force_offline bit
    content_in_use bit
    behaviourComposer_content_id bigint not null,
    offline_instructions text,
    online_instructions text,
    title text,
    primary key (uid)
);


I say like as I've just quickly hacked that up manually - it may not be valid code. My sql syntax tends to not be brillant 9:49pm at night!

Trying to take your existing database and align it with the code manually would take some time. I think it would be better to either use the database tables created from the rename of the noticeboard tool, or you would have to go back to the submit codebase again.

Is it possible for you to use the tables that were generated from the copy of the noticeboard tool. Only the create_lams_tool_behaviourComposer.sql and drop_lams_tool_behaviourComposer.sql shuold need to be replaced - the rest of the sql scripts are updated to other tables rather than defining the tool's tables.

I've attached a version of the two files, taken from what the rename tool produced and updated so the default tool content has your title and text. I haven't tested the code since I updated the title and text but hopefully I haven't typed anything wrong.

I could run the rename tool over submit again and send you that with the jsp's fixed up for the submit text replacement problems in the jsp files. But that won't be till tomorrow - I can't see me getting it done tonight. And then you will have lost another day.

Fiona

Posted by Fiona Malikoff

Attachments:
11: Re: Re: Re: Re: Re: Re: Re: Re: Changes to how we use the FCKEditor in 2.0
In response to 10 09/18/06 06:59 AM
[ Reply | Forward ]
Hi. Thanks.

It seems to be working fine now!

The reason I had the inconsistent create_lams_tool_behaviourComposer.sql file is that I had a problem with it a couple weeks ago and you sent me an edited version that fixed the problem. So I stuck with it without noticing that it was tied to the old version. Replacing it with the version you attached worked fine.

Now the real really begins!

-ken

Posted by Ken Kahn

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum