PostIcon CS Bug Fix

03 September 2007

With the previous release of The MiXX Collection, it was updated to work with CS 2007.  Well there is a bug in CS 2007's CSModule that no longer allows updating the ExtendedAttributes after a post is created. 

In other words, the bug in the PostIcon that was introduced with 1.0 release caused a 0.jpg PostIcon to be saved at times and not propertly updating the WeblogPost object. 

Download: As always, you can download the latest version and source from the file gallery.

This release, version 1.1, resolves this issue with a performance penalty work-around.  But due to the changes and protection in the CSModules, there isn't any other way.  The work-around is during a CreatePost event, we don't write the ExtendedAttributes on the PrePost CSModule event (since we do not have the PostID any longer).  Instead, I hook into the AfterPost event that fires, after the post has been created, to obtain the PostID.  This fires off an UpdatePost method to write the entire post to the DB - again.

Don't worry, this is only during the first initial CreatePost event.  If you go back and Update a post, it fires normally - that is only 1 time because we now have a PostID during the PrePost event to write to the ExtendedAttributes. 

I'm open to suggestions if someone else has a cleaner solution.  It all comes down to not being able to update/write to the ExtendedAttributes during the AfterPost (PostPost) CSModule event.  I've mentioned it for years, there should be a method to save the ExtendedAttributes without having to update the entire object.

And as always, bookmark this link for updates: http://eduncan911.com/archive/tags/The+MiXX+Collection/default.aspx  You can also access the RSS option in there to subscribe via RSS as well.

 

 
Reader's Comments
 
Alex said:
25 September 07 7:34 PM

Hello,

I have just installed cs 2007.1

I can't find <trust level="medium"/> in my web.config file, where should i search?

Thanks in advance

 
Alex said:
25 September 07 8:29 PM

I figured out the think above. But i have a big one now, i double checked everything and it still does not work, no error, I put the img in the blog, but it is not compiled. Any ideas? cs 2007.1

 
Doug Taylor said:
17 October 07 10:53 AM

I ran into something that may be related to what you're seeing Alex: The instructions tell you to add <add name="PostIconModule" type="MiXX.PostIcon.Modules.PostIconModule, MiXX.PostIcon" /> to the <Modules> section of the CommunityServer.config file.  Mine didn't work until I added that to the <CSModules> section (not sure why there are two different sections).

 
17 October 07 7:35 PM

Hey Alex:

I apologize - I missed your comment or i would have responded earlier.  Doh.

Alex/Doug:

That is correct.  CS 2007.1 changed a fundimental node in CommunityServer.config from "Modules" to "CSModules".

I need to update the readme for yet another change to CS 2007.1.

Now, there are two different sets of instructions.  CS 2007, use <Modules>.  CS 2007.1, use <CSModules>.

 
aobi said:
13 August 08 7:31 PM

Hi,

Is the current v1.1 is compatible with CS2008?

(or do you have any plans to release a v1.2 anytime soon?)

 
14 August 08 10:49 AM

Hello Aobi:

No, it is not directly compatible since the namespaces and entities have changed in CS.  And I do not have plans to upgrade it.

The source code is freely available for download, to modify as you wish.  Or hit me up if you would like me to.

Thank you!

 
Woody said:
20 July 09 7:33 AM

Hi,

I was wondering if there is a CS 2008.5 version available? Some bits seem to have changed quite a bit and I've got a hard time figuring it out...

thanks!

W.

 
20 July 09 9:41 AM

Hello Woody:

I am sorry, but I do not have plans to support newer versions of CS with this module.  

The source code is freely available to download and modify, as you wish.

Or, hit me up if you would like me to.  (email me from the Who Am I?)

Thank you,

-Eric

Leave a Comment
Comment Policy: HTML is not allowed. Links and line breaks are converted automatically.
(required) 
(optional)
(required) 

 


  
Enter the anti-spam code you see above (required)

 

Comment Notifications
Subscribe to this post's comments using RSS

If you would like to receive an email when updates are made to this post, please register here