warning while installing BE 2.9

Topics: Business Logic Layer, Controls
Jan 3, 2014 at 3:30 PM
I tried to install blogengine 2.9 version, when I execute query through sql server mangement studio(2012) for mssql database, I got following warning:

The maximum key length is 900 bytes. The index 'idx_be_CustomType_ObjectId_BlogId_Key' has maximum length of 1216 bytes. For some combination of large values, the insert/update operation will fail.
please tell me , should i install BE WITH mssql and ignore the warning or with XML.

Regards
Amit
Jan 6, 2014 at 3:14 PM
I saw the same warning. After the upgrade the blogs appear to be generally working OK.

However if I go admin > custom > themes > click on the 'standard' theme link and edit one of the custom fields e.g. my twitter account. It says it is saved, but does not appear in the custom fields folder and is not reflected in the links on the page.

Am I trying to edit the custom fields in the wrong way?
Coordinator
Jan 6, 2014 at 3:53 PM
You can get rid of this warning by making some fields length smaller.
Page content usually cached, so you may not see change in the theme right away. But you should see it changed in the theme properties windows, once saved and closed, opening it again should show updated values.
drop table [dbo].[be_CustomFields]
GO

CREATE TABLE [dbo].[be_CustomFields](
    [CustomType] [nvarchar](25) NOT NULL,
    [ObjectId] [nvarchar](100) NOT NULL,
    [BlogId] [uniqueidentifier] NOT NULL,
    [Key] [nvarchar](150) NOT NULL,
    [Value] [nvarchar](max) NOT NULL,
    [Attribute] [nvarchar](250) NULL
)
GO

CREATE NONCLUSTERED INDEX [idx_be_CustomType_ObjectId_BlogId_Key] ON [dbo].[be_CustomFields] 
(
    [CustomType] ASC,
    [ObjectId] ASC,
    [BlogId] ASC,
    [Key] ASC
)
GO
Jan 6, 2014 at 6:18 PM
The new SQL fixes the index issue.

However, I still see the issue that if
  • Login to my blog
  • I go admin > custom > themes > click on the 'standard' theme link (the one I am using) and edit my twitter account custom field setting
  • Press save. I get the saved message
  • I reload the theme properties dialog then it has reverted back to the default value
Also I see no new row in the be_customfields table as I would have expected.

Is my edit process the way I am meant to do it, its there another way to set custom field values?
Coordinator
Jan 6, 2014 at 6:52 PM
This is a bug, just fixed with 2.9.0.3 (it is in Core dll, database provider was not handling null attribute value).
Jan 6, 2014 at 7:42 PM
Yes 2.9.0.3 fixed it, thanks. I can now update the custom fields and they are persisted to the DB
Jan 7, 2014 at 8:57 AM
Yes, it works after change db table values and now there is no warning.
CREATE TABLE [dbo].[be_CustomFields](
[CustomType] [nvarchar](25) NOT NULL,
[ObjectId] [nvarchar](100) NOT NULL,
[BlogId] [uniqueidentifier] NOT NULL,
[Key] [nvarchar](150) NOT NULL,
thanks rtur
May 23, 2014 at 2:58 AM
Where can one get BE 2.9.0.3 ?
May 23, 2014 at 9:47 AM
Edited May 23, 2014 at 9:47 AM
You get the latest source from this site and build it yourself