A Single Blog, the Easy Way

This post has 51 Replies | 14 Followers

Top 10 Contributor
Posts 3,424
Points 65,610
CS Developers
Ben Tiedt replied on Mon, Mar 12 2007 4:30 PM

Does your application key have an uppercase "D" for "Dave" or is it lowercase?

The way the blog is loaded in this case, the lookup *will* be case-sensitive. 

Dave:
like I say it works fine on Kid Congo, just not on other themes

Kid Congo does not load theme data inline with the page so this issue would not affect it.  I would imagine that the default and default2 themes work as well.

Ben Tiedt's Blog

  • | Post Points: 20
Top 10 Contributor
Male
Posts 2,365
Points 15,700
MVPs
Dave replied on Tue, Mar 13 2007 9:40 AM

Where is the appKey defined? /controlpanel/BlogAdmin/SectionEdit.aspx?tab=blog&SectionID=3 just shows....

Name
URL /blogs/
Owner (optional)
Blog Group Blogs
Enable Blog
YesNo
Enable AggBugs
YesNo
Index Posts
YesNo
Include in community aggregate
YesNo
Default Language (Not Specified/Site Default) Chinese (Simplified) Chinese (Traditional) Danish English Greek Italian

 

  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,610
CS Developers
Ben Tiedt replied on Tue, Mar 13 2007 9:46 AM

It would be the value for URL.  It is also displayed as "name" when selecting a blog in the "My Blogs" area of the control panel.

Note that after beta-1, the applicationKey lookup used for theme configuration data is case insensitive.

Ben Tiedt's Blog

  • | Post Points: 35
Top 10 Contributor
Male
Posts 2,365
Points 15,700
MVPs
Dave replied on Tue, Mar 13 2007 11:55 AM

My Blogs (/controlpanel/blogs/switch.aspx) shows name separately to appKey.

Admin > Blogs > Blogs (/controlpanel/BlogAdmin/Blogs.aspx) does show name as appKey though

I'll check the case tonight and see if that fixed it
 

  • | Post Points: 5
Top 10 Contributor
Male
Posts 2,365
Points 15,700
MVPs
Top 150 Contributor
Posts 139
Points 1,620
I set my application key to blog and copied the files to the root as is, I am getting the following error logged:

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; InfoPa
Path: /themes/blogs/paperclip/postlist.aspx?App=Blog as HTTP GET
Referrer:
Message: Forum Forum Error in the application. does not exist. does not exist.
CommunityServer.Components.CSException: Forum Error in the application. does not exist.
at CommunityServer.Components.PermissionBase.RedirectOrException(CSExceptionType csEx)
at CommunityServer.Components.CSApplicationData.GetSection(String applicationKey)
at CommunityServer.Components.CSContext.get_SectionThemeData()
at CommunityServer.Controls.SectionThemeConfigurationDataStyle.get_DataSource()
at CommunityServer.Controls.SectionThemeConfigurationDataStyle.get_Href()
at CommunityServer.Controls.Style.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at CommunityServer.Controls.Head.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at CommunityServer.Components.CSPage.Render(HtmlTextWriter writer)
at CommunityServer.Components.CSFormPage.Render(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Kevin Tunis

  • | Post Points: 20
Top 10 Contributor
Posts 3,424
Points 65,610
CS Developers
Ben Tiedt replied on Tue, Mar 13 2007 11:15 PM

KevinTunis:
I set my application key to blog and copied the files to the root as is, I am getting the following error logged

You're experiencing the same issue as Dave.  The appKey is "blog" and you were accessing "Blog".  This is fixed in the next beta of CS2007.

Ben Tiedt's Blog

  • | Post Points: 5
Not Ranked
Posts 4
Points 50
oykica replied on Tue, Mar 20 2007 11:12 AM

I'm really looking forward to using all these new features. I was hoping that you could explain how to setup the images folder in a little more detail. I have installed a copy of the Beta and created a blog with the key blog. This was created in the default location of Web\blogs\blog.

I have downloaded the override config files for "Blog at Root" and deployed them without modification. I intentionally left the override of the blogFileStorageLocation with the value ~/images because this is the location that I would like my blog files to be stored. I created a Web\images folder and gave the ASPNET account the appropriate permissions.

I was able to upload files without error but have found the path to the files is not as I expected. A new folder called blog was created under the new images folder, so my files are being uploaded to Web\images\blog. I expected that the uploaded files would be created in the root of the images folder, which is the desired behaviour for a single user blog.

Is it possible to get the uploaded files to all reside within the Web\images folder and not Web\images\blog? Thanks in advance.

Top 50 Contributor
Posts 765
Points 39,800
CS Developers
oykica:

I was able to upload files without error but have found the path to the files is not as I expected. A new folder called blog was created under the new images folder, so my files are being uploaded to Web\images\blog. I expected that the uploaded files would be created in the root of the images folder, which is the desired behaviour for a single user blog.

Is it possible to get the uploaded files to all reside within the Web\images folder and not Web\images\blog? Thanks in advance.

This is done on purpose to seperate the blog files for each blog.  So the blogFileStorageLocation is the root folder that will be used for blog files.  The files are actually saved inside a subfolder with the name of the your blog's AppKey (url).  Otherwise, for a site with multiple blogs, each blog would be able to view and overwrite other blog's files which can be a bad thing.

I can see how a single blog site may not want to have the images saved in a subfolder as it's not strictly necessary. But that is not a configurable option at this time.  You could, however, change the blogFileStorageLocation to be the root ( "~")  or the blogs folder ("~/blogs").  That would result in your images getting saved in "/blog"  or "/blogs/blog" which may look a little better to you.

 

Kevin Harder

  • | Post Points: 20
Not Ranked
Posts 4
Points 50
oykica replied on Thu, Mar 29 2007 5:28 AM

Hi Kevin,

Thank you for the reply. I understand the logic behind the decision to append the AppKey to the path. I guess I could do you as you suggest and use the root ("~") for the blogFileStorageLocation and perhaps even use "images" as the blog's AppKey.

Thanks again.

Cheers,


okyica.

Top 75 Contributor
Posts 306
Points 4,560
jeffesp replied on Wed, Apr 4 2007 3:11 PM

I wanted multiple blogs at the root, so I changed the siteurls_override.config to only contain the following: 

 <?xml version="1.0" encoding="utf-8" ?>
<Overrides>
 <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "change" name = "path" value = "/" />
 <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "new" name = "physicalPath" value = "/blogs/" />
</Overrides>

It seems to be working out pretty well.  Just thought I would share.

--
--Jeff (ATGi)
  • | Post Points: 35
Top 10 Contributor
Posts 4,137
Points 77,110
CS Developers

jeffesp:

I wanted multiple blogs at the root, so I changed the siteurls_override.config to only contain the following: 

 <?xml version="1.0" encoding="utf-8" ?>
<Overrides>
 <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "change" name = "path" value = "/" />
 <Override xpath = "/SiteUrls/locations/location[@name='weblogs']" mode = "new" name = "physicalPath" value = "/blogs/" />
</Overrides>

It seems to be working out pretty well.  Just thought I would share.

Awesome, thanks for sharing! Cool

Rick Reszler


  • | Post Points: 5
Not Ranked
Posts 17
Points 235
gduthie Big Smile [:D] replied on Sat, Apr 28 2007 2:59 AM

Just tried the overrides on a new RTW install of CS 2007, and this works very nicely.

Thanks for making the config so much simpler, Scott!

Top 10 Contributor
Male
Posts 2,365
Points 15,700
MVPs
Dave replied on Thu, May 24 2007 1:31 PM

 <Override xpath = "/CommunityServer/Weblog" mode = "change" name = "blogFileStorageLocation" value = "~/images" />

Does anybody know the reason for changing the above for blogging at the root? 

  • | Post Points: 5
Top 500 Contributor
Posts 72