Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Announce It! ( ...  DotNetNuke 3.3.5/4.3.5 Public Release
Previous Previous
 
Next Next
New Post 10/3/2006 9:51 PM
User is offline Daniel Gilleland
28 posts
www.DynamicGeneration.com
10th Ranked


Re: DotNetNuke 3.3.5/4.3.5 Public Release 

Note re DNN-3706: The fix in DNN 4.3.5 is only a "partial" fix of the ValidationExpression problem in Profile Definitions.

I have posted the bug to the public Gemini, and am re-producing the details of it here. I hope to get a closer look at the "why", as a functioning ValidationExpression is a required use case for a client of mine.


DNNP-4205

The issue DNN-3706 that was "fixed" in DNN 4.3.5 is only "partially" fixed.

(Added Note: While this bug is rated as "Minor", it does produce an exception when attempting to edit user profiles and may be considered "Major" for some use cases where profile validation is deemed essential.)



While the ValidationExpression column in the ProfilePropertyDefinition is indeed expanded to 2000 characters (from 100) as per DNN-3706, attempting to store a ValidationExpression via the Add/Edit Profile Property admin page only stores the first 100 characters.

How to reproduce:
1) Fresh DNN4.3.5 install
2) Add profile property "Birthdate" with a datatype Text and length 10, make it required and visible, and...
3) Set the ValidationExpression in the form to the following:
(^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19)|([2]([0]{1})))([0-9]{2}))))$)

It will truncate at 100 characters to store in the db table as this value:
(^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19)

This validation expression is to ensure that a valid date is entered between 1/1/1900 to 31/12/2099 (as taken from regexlib.com).

This truncated value will prevent any attempt to edit a user's profile with the following exception details:



AssemblyVersion: 04.03.05
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 42
ActiveTabName: User Accounts
RawURL: /435Install/Admin/UserAccounts/tabid/42/ctl/Edit/mid/357/UserId/2/Default.aspx
AbsoluteURL: /435Install/Default.aspx
AbsoluteURLReferrer: http://localhost/435Install/Admin/UserAccounts/tabid/42/ctl/Edit/mid/357/UserId/2/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 0be5e0e8-f7dd-447b-84b5-d7026c641fea
InnerException: (^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19) is not a valid regular expression.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Text.RegularExpressions.RegexParser.ScanRegex
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: (^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19) is not a valid regular expression. ---> System.Web.HttpException: (^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19) is not a valid regular expression. ---> System.ArgumentException: parsing "(^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19)" - Not enough )'s. at System.Text.RegularExpressions.RegexParser.ScanRegex() at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op) at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache) at System.Text.RegularExpressions.Regex.IsMatch(String input, String pattern) at System.Web.UI.WebControls.RegularExpressionValidator.set_ValidationExpression(String value) --- End of inner exception stack trace --- at System.Web.UI.WebControls.RegularExpressionValidator.set_ValidationExpression(String value) at DotNetNuke.UI.WebControls.FieldEditorControl.BuildValidators(EditorInfo editInfo, String targetId) at DotNetNuke.UI.WebControls.FieldEditorControl.BuildDiv(EditorInfo editInfo) at DotNetNuke.UI.WebControls.FieldEditorControl.CreateEditor() at DotNetNuke.UI.WebControls.FieldEditorControl.DataBind() at DotNetNuke.UI.WebControls.PropertyEditorControl.AddEditorRow(Table& tbl, String name, IEditorInfoAdapter adapter) at DotNetNuke.UI.WebControls.CollectionEditorControl.AddEditorRow(Table& tbl, Object obj) at DotNetNuke.UI.WebControls.PropertyEditorControl.CreateEditor() at DotNetNuke.UI.WebControls.ProfileEditorControl.CreateEditor() at DotNetNuke.UI.WebControls.PropertyEditorControl.DataBind() at DotNetNuke.Modules.Admin.Users.Profile.DataBind() at DotNetNuke.Modules.Admin.Users.ManageUsers.ShowPanel() at DotNetNuke.Modules.Admin.Users.ManageUsers.cmdProfile_Click(Object sender, EventArgs e) at DotNetNuke.UI.WebControls.CommandButton.RaiseClick(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: DG-NX01


 

 
New Post 10/5/2006 7:03 AM
User is offline Daniel Gilleland
28 posts
www.DynamicGeneration.com
10th Ranked


Re: DotNetNuke 3.3.5/4.3.5 Public Release 

Here's the fix. Quite simple, really. In DNN 4.3.5 (and 3.3.5) the following Add/Update stored procedures needed their @ValidationExpression parameter set to 2000 characters (from 100).

Here's the "patch" script:


/* Fix AddPropertyDefinition */

/********************************/

IF EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'{databaseOwner}{objectQualifier}AddPropertyDefinition') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)

DROP PROCEDURE {databaseOwner}{objectQualifier}AddPropertyDefinition

GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}AddPropertyDefinition

@PortalId int,

@ModuleDefId int,

@DataType int,

@DefaultValue nvarchar(50),

@PropertyCategory nvarchar(50),

@PropertyName nvarchar(50),

@Required bit,

@ValidationExpression nvarchar(2000),

@ViewOrder int,

@Visible bit,

@Length int

AS

DECLARE @PropertyDefinitionId int

SELECT @PropertyDefinitionId = PropertyDefinitionId

FROM {objectQualifier}ProfilePropertyDefinition

WHERE (PortalId = @PortalId OR (PortalId IS NULL AND @PortalId IS NULL))

AND PropertyName = @PropertyName

IF @PropertyDefinitionId is null

BEGIN

INSERT {objectQualifier}ProfilePropertyDefinition (

PortalId,

ModuleDefId,

Deleted,

DataType,

DefaultValue,

PropertyCategory,

PropertyName,

Required,

ValidationExpression,

ViewOrder,

Visible,

Length

)

VALUES (

@PortalId,

@ModuleDefId,

0,

@DataType,

@DefaultValue,

@PropertyCategory,

@PropertyName,

@Required,

@ValidationExpression,

@ViewOrder,

@Visible,

@Length

)

SELECT @PropertyDefinitionId = SCOPE_IDENTITY()

END

ELSE

BEGIN

UPDATE {objectQualifier}ProfilePropertyDefinition

SET DataType = @DataType,

ModuleDefId = @ModuleDefId,

DefaultValue = @DefaultValue,

PropertyCategory = @PropertyCategory,

Required = @Required,

ValidationExpression = @ValidationExpression,

ViewOrder = @ViewOrder,

Deleted = 0,

Visible = @Visible,

Length = @Length

WHERE PropertyDefinitionId = @PropertyDefinitionId

END

SELECT @PropertyDefinitionId

GO

/* Fix Update Property Definition Stored Procedures */

/****************************************************/

if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}UpdatePropertyDefinition]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)

DROP PROCEDURE {databaseOwner}[{objectQualifier}UpdatePropertyDefinition]

GO

CREATE PROCEDURE {databaseOwner}[{objectQualifier}UpdatePropertyDefinition]

@PropertyDefinitionId int,

@DataType int,

@DefaultValue nvarchar(50),

@PropertyCategory nvarchar(50),

@PropertyName nvarchar(50),

@Required bit,

@ValidationExpression nvarchar(2000),

@ViewOrder int,

@Visible bit,

@Length int

as

UPDATE {databaseOwner}{objectQualifier}ProfilePropertyDefinition

SET DataType = @DataType,

DefaultValue = @DefaultValue,

PropertyCategory = @PropertyCategory,

PropertyName = @PropertyName,

Required = @Required,

ValidationExpression = @ValidationExpression,

ViewOrder = @ViewOrder,

Visible = @Visible,

Length = @Length

WHERE PropertyDefinitionId = @PropertyDefinitionId

GO

 

 
New Post 10/5/2006 2:11 PM
User is offline Ismet Dumlupinar
620 posts
www.mynetnuke.com
7th Ranked




Re: DotNetNuke 3.3.5/4.3.5 Public Release 
Ty for the solution script, however all dnn 4.3.5 users need this?



Ismet Dumlupinar
MCP/MCDST/MCT
DotNetNuke Türkçe
My DotNetNuke Blog for Global Users
 
New Post 8/4/2008 6:06 AM
User is offline David Gilfillan
6 posts
10th Ranked


Re: DotNetNuke 3.3.5/4.3.5 Public Release 
Hi, not sure who I should report this too but I have just installed v 4.8.4 and noticed encountered this problem. After a little investigation I narrowed down the the fact that the AddPropertyDefinition stored procedured has been changed to allow a max of 2000 characters for a validation expression. However, the UpdatePropertyDefinition stored procedure had not. I have done this manually on my own DNN installation and it fixes the problem. It obviously needs to be addressed for future releases. Hope that helps someone...
 
New Post 8/4/2008 9:59 PM
User is offline ROBAX
1875 posts
5th Ranked


Re: DotNetNuke 3.3.5/4.3.5 Public Release 

Create an account here: http://support.dotnetnuke.com/Main.aspx

Then add a new issue in the section labeled: ** DNN Core Framework and Modules [ PUBLIC ] ** (DNNP)

Try and be specific about the details and hopefully it'll get checked and picked up.

Rob

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Announce It! ( ...  DotNetNuke 3.3.5/4.3.5 Public Release
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com
PartnerPoint | Community of Microsoft Partners
PartnerPoint is one of the largest and most active online communities of Microsoft Partners worlwide with over 8,000 members.
www.PartnerPoint.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP