Wednesday, November 19, 2008
 
  Forum  Products  BlogDisplay  Item Template length too short?
Previous Previous
 
Next Next
New Post 7/29/2008 12:09 AM
Resolved
  subodh
7 posts
www.subodh.com
No Ranking


Item Template length too short? 

okay, maybe I'm trying too much. If the HTML is too long inside the item template, it gets truncated, no warning .. just bad rendering. What is the limit and why? Cant the internal type be text?

 
New Post 7/29/2008 8:11 PM
  Rip Rowan
34 posts
No Ranking


Re: Item Template length too short? 

I'm sorry to hear you hit the limit!   The settings are stored in the DNN "ModuleSettings" table, which imposes a 2000 character limit.  I'm surprised you hit it - but really, there shouldn't be a limit.

We'll look into removing this limit in our next version.

 
New Post 8/7/2008 7:55 PM
  subodh
7 posts
www.subodh.com
No Ranking


Re: Item Template length too short? 

Hi

I'd appreciate if you could tell me how would I go about increasing the limit. I checked the ModuleSettings Tabel definition and could not find a way to increase the limit (even if I make the length ntext). Where exactly are the itemtemplate (text values) stored?

 
New Post 8/9/2008 9:42 PM
Accepted Answer 
  subodh
7 posts
www.subodh.com
No Ranking


Re: Item Template length too short? 

I think I solved the problem. Please let me know if I overdid something. Thank you - Subodh

 

 BEGIN TRANSACTION
GO
ALTER TABLE dbo.TabModuleSettings
 DROP CONSTRAINT FK_TabModuleSettings_TabModules
GO
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.Tmp_TabModuleSettings
 (
 TabModuleID int NOT NULL,
 SettingName nvarchar(50) NOT NULL,
 SettingValue ntext NOT NULL
 )  ON [PRIMARY]
  TEXTIMAGE_ON [PRIMARY]
GO
IF EXISTS(SELECT * FROM dbo.TabModuleSettings)
  EXEC('INSERT INTO dbo.Tmp_TabModuleSettings (TabModuleID, SettingName, SettingValue)
  SELECT TabModuleID, SettingName, CONVERT(ntext, SettingValue) FROM dbo.TabModuleSettings WITH (HOLDLOCK TABLOCKX)')
GO
DROP TABLE dbo.TabModuleSettings
GO
EXECUTE sp_rename N'dbo.Tmp_TabModuleSettings', N'TabModuleSettings', 'OBJECT'
GO
ALTER TABLE dbo.TabModuleSettings ADD CONSTRAINT
 PK_TabModuleSettings PRIMARY KEY CLUSTERED
 (
 TabModuleID,
 SettingName
 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO
ALTER TABLE dbo.TabModuleSettings WITH NOCHECK ADD CONSTRAINT
 FK_TabModuleSettings_TabModules FOREIGN KEY
 (
 TabModuleID
 ) REFERENCES dbo.TabModules
 (
 TabModuleID
 ) ON UPDATE  NO ACTION
  ON DELETE  CASCADE
  NOT FOR REPLICATION

GO
COMMIT

GO
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

 

ALTER procedure [dbo].[UpdateModuleSetting]

@ModuleId      int,
@SettingName   nvarchar(50),
@SettingValue  ntext

as

update dbo.ModuleSettings
set SettingValue = @SettingValue
where ModuleId = @ModuleId
and SettingName = @SettingName
GO
ALTER procedure [dbo].[UpdateTabModuleSetting]

@TabModuleId   int,
@SettingName   nvarchar(50),
@SettingValue  ntext

as

update dbo.TabModuleSettings
set    SettingValue = @SettingValue
where  TabModuleId = @TabModuleId
and    SettingName = @SettingName


GO

 

 
New Post 8/17/2008 3:08 PM
  Rip Rowan
34 posts
No Ranking


Re: Item Template length too short? 

I think this solution will work for now.  In the next version we plan to simply move all of the settings into a dedicated table.

 
New Post 10/3/2008 12:46 AM
  subodh
7 posts
www.subodh.com
No Ranking


Re: Item Template length too short? 

Thank you Rowan :-)

Your  module has been running awesome for the last 3+ months.

 

 
Previous Previous
 
Next Next
  Forum  Products  BlogDisplay  Item Template length too short?
Privacy Statement  |  Terms Of Use
Copyright 2008 Radiant Software Corporation. All Rights Reserved.