This project is read-only.

Page Slugs not being persisted??

Topics: Business Logic Layer
Jul 6, 2009 at 3:07 PM

Am i missing something or are 'Slugs' for pages arent being saved?

The 'be_posts' table has a 'Slug' column, but the 'be_Pages' doesnt.. 


Jul 6, 2009 at 3:10 PM

I am experiencing this to - using sql data source!

Jul 6, 2009 at 3:18 PM

yeah, ive just noticed it. They are fine while the app is still in memory as they are stored on the page object, but they are not persisted to the database so as soon as the app reloads, they are gone.

Im working on a fix... So far ive got this...

1. Add the field to the be_pages table

[Slug] [nvarchar](255) NULL,


2. Then in the DBLogProvider.cs, update the  following procedures to include the Slug field/parameter.

public override void UpdatePage(Page page);
public override void InsertPage(Page page);
public override Page SelectPage(Guid id); 


I think that should do it.. just testing now....








Jul 6, 2009 at 3:31 PM

Also need to update the "page.cs"



public string Slug
	   if (string.IsNullOrEmpty(_Slug))
	       return Utils.RemoveIllegalCharacters(Title);
	    return _Slug;
         if (_Slug != value) MarkChanged("Slug");
             _Slug = value; 




Jul 6, 2009 at 3:31 PM

Yeah i've done exactly the same, seems to work!

Jul 6, 2009 at 4:11 PM

Working for me too... 

Thants another one sorted...