Large HTML table is not saving

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/28/2010 2:08:48 PM
Gravatar
Total Posts 5

Large HTML table is not saving

We have a few large HTML tables that care causing major problems for our editors. The table is about

28,000 characters large. I am able to manually drop it in to the database and it displays fine. But if I then open and try to edit and save, the server spins for a good 3 minutes and then just dies, The end result is a table that is 1/2 saved as you can see here

http://www.harvardlongwoodpsychiatry.org/research-faculty.aspx

We are on version 2.2.7.3 MSSQL

Any help you can provide would be appreciated

 

12/28/2010 2:26:12 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Large HTML table is not saving

First off, I strongly recommend that you upgrade as soon as possible. 2.2.7.3 was released over two years ago, and some serious security flaws have been identified and fixed since then.

In viewing the source, I noticed that there are font size and face declarations on each td element, which is increasing the size of the HTML tremendously. My guess is that this table was originally copied and pasted out of Word or Excel, and Microsoft's markup is notoriously messy. I'd start with editing out all of those extraneous font declarations, to see if that helps.

You might also consider breaking the table up into a few logical chunks, and put each into its own separate feature.

Jamie

12/28/2010 2:30:40 PM
Gravatar
Total Posts 5

Re: Large HTML table is not saving

Thanks for the quick reply on this. I will certainly look into an upgrade. Its just tough as Harvard is a very large organization. I did strip out all the font tags and got it down to about 19,000 characters. Tried editing again and it once again spun for a couple minutes and then died. Is there anything in the code I can do to fix? Seems like taking the data from the page to the db should not spin for so long

Thanks

 

12/28/2010 2:41:31 PM
Gravatar
Total Posts 18439

Re: Large HTML table is not saving

Hi,

I agree with Jamie that it would be good to upgrade, it is a very old version, but that is not what I would do to solve this problem and doing that might actually complicate it depending on what the real problem is.

First thing to do is Basic Troubleshooting, clear the mojoportal log, try to save the large table, then see if any error is logged.

Were you able to edit this large content previously and the problem just started?

Also I'm not even clear on what problem you are having, please clarify what you mean by:

I am able to manually drop it in to the database and it displays fine.

You are editing mojoPortal tables directly in SQL Server and it works?

I would check that the database and/or the site is not running out of disk space or any other errors that the database might be logging in addition to any clues the mojoPortal log.

Maybe if there are clues in the log we can suggest further steps.

Hope it helps,

Joe

 

Before you consider upgrading find out what version of MS SQL you have, if it is SQL 2005/2008 you can upgrade to the latest version but if SQL 2000 you cannot upgrade all the way to the latest version without migrating to a supported version of SQL Server.

 

12/28/2010 3:16:12 PM
Gravatar
Total Posts 5

Re: Large HTML table is not saving

Hi,

I cleared the log, tried it again and got the following:

2010-12-28 14:10:23,219 [45004] INFO  mojoPortal.Business.WebHelpers.IndexWriterTask [(null)] - deserialized IndexWriterTask task
2010-12-28 14:10:23,220 [35620] INFO  mojoPortal.Business.WebHelpers.IndexWriterTask [(null)] - Queued IndexWriterTask on a new thread
2010-12-28 14:13:21,692 [29924] INFO  mojoPortal.Web.Global [(null)] - Application Started.
2010-12-28 14:13:22,266 [32840] INFO  mojoPortal.Web.WebTaskManager [(null)] - deserialized WebTaskManager task
2010-12-28 14:13:22,271 [29924] INFO  mojoPortal.Web.WebTaskManager [(null)] - Queued WebTaskManager on a new thread

When I said I could manually drop it into the db, I mean I am able to edit content from Enterprise Manager using an update statement. Not ideal but this one table will not save and the client really needed it in.

Does this error report help in solving the issue?

Thanks

12/29/2010 7:07:56 AM
Gravatar
Total Posts 18439

Re: Large HTML table is not saving

Hi,

Is the content in the editor before you save it or is it getting lost when you paste it into the editor?

Can you try using a different editor and see if it produces the same result. ie if using CKeditor try TinyMCE or vice versa. You can set the editor from Administration > Site Settings.

Best,

Joe

12/30/2010 2:38:27 PM
Gravatar
Total Posts 5

Re: Large HTML table is not saving

Thanks for the tips but swapping editors did not do anything different. The paste into the editor works fine. I can see the whole table, make changes etc. Its when I hit save that it spins and then dies. Any other debugging techniques I can do to try to resolve? Thanks for the help so far

 

12/31/2010 7:16:18 AM
Gravatar
Total Posts 18439

Re: Large HTML table is not saving

The only thing I can think of that might be happening is if the data type is not declared correctly either in code or in the stored procedures mp_HtmlContent_Insert and mp_HtmlContent_Update then it could be truncating the data if the param is declared too small. I don't recall there ever being a bug like that but it was along time ago. You might check those procedures and see what data types are used for the content, it should be ntext which should be large enough.

If the params are of the correct data type in the stored procedures then it could be they are declared incorrectly from code and the only solution is to upgrade assuming that is really what is happening (I'm only guessing at what could be happening), I don't have a version of the code that old lying around except maybe somewhere on a dvd backup.

However, upgrading from a version that old has several implications, I've updated the document here:

http://www.mojoportal.com/upgrading.aspx

with some info about upgrading from very old versions. You need to be aware of changes like your current version runs under .NET 2.0 but to upgrade to the latest you need .NET 3.5 SP1 or .NET 4.0. Also if you are using MS SQL 2000, we stopped supporting that after version 2.3.4.5 so to upgrade to the latest you need at least SQL 2005 with all service paks applied or SQL 2008.

In the long run if it is possible for you to upgrade to the latest version that would be the best way to go. If there is a bug in an older version it can only be fixed in a newer version.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.