I understand that there is currently no import feature for blog4umbraco, so I am attempting to add backdated posts. What I've done is altered the blog, datefolder document types to allow manual creation of date folders. Then added my date folders & finally created blog posts within them.
Now the posts show up allright but they're dated with the create date not the folder date. I've tried altering the createdate in the database (cmsContentXml) for the records in question, also tried clearing the cache by deleting umbraco.config, but no luck, the create date still shows up as today.
I'm sure I've done something similar a couple of months ago on another site with an earlier version of blog4umbraco, but now I'm really stuck.
I had to do exactly the same thing as you in december for a client of mine upgrading from v3 to v4 and I am pretty sure I did exactly as you have done.
I've had this problem as well. Always uses the create date instead of the publish date. I'll be digging into this soon as a client coming up will need this functionality.
Also, scheduling didn't work when I was testing it. Should that work?
The date of content probably matches the create date in most cases but
not all. And it's not likely to be the last published date either if
you just updated a spelling error.
How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:
change a date for a post that was created earlier but wants to be posted as of today
change dates of imported posts
ensure correct date to scheduled posts
This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.
**NEWBIE** I also need to back date posts for the last 4 years. Is there any easy way to perform this action in blog4Umbraco? It is important to the client that the old posts exist in the correctly dated file structure within the blog. Any help would be greatly appreciated!
Thanks Chris for the unpublish hint. After much mucking around I'm now halfway there, but still struggling.
I find that if I create the folder/blog post but not publish it, then change the createDate in umbracoNode table, then publish, the date shows up allright on the blog post itself.
However I'm still having trouble with the archive pages. The backdated month shows up on the archive list, but the month's page lists entries from that month of *this* year as well as the backdated year, and the dates under the older posts use the later date, not the date I changed before.
There are createDate & updateDate fields in umbracoNode and in ContentXml tables. Don't like modifying the database & wish I could figure out what's the minimum required to get this happening. Even so it's still a big job to manually add the contents of even a small blog.
This is turning out to be quite a pickle. Going to have to take a break from it & come back to it later.
Does anyone know if there there any plans to provide an import or backdating functionality, as it sure seems like something that would be very useful!
+ 1 for being able to change the date of posts. It doesn't seem possible currently to enter historical posts to a new blog currently, which has been crucial in both projects I've tried to use this for so far.
It's a bit complex problem. To change the create date is pretty easy. You can set the CreateDateTime property on the Document object for that using the API. Only problem is that this doesn't solve the archive case. The tree folder structure that Blog4Umbraco is using is based on the create document event and you don't have access to the CreateDateTime property when this occurs.
I was thinking about this problem for umbImport and came up with an Idea to create a dummy import folder. Imported documents could be stored then in this folder and when it's imported an after Import event can be used to to move the document to the correct Datefolder. This is just a theory, but I think this should work. I'll create a blogpost/package about this some time.
This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items.
I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...
This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items.
I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...
Unfortunately I have no influence on the Date structure of Blog4Umbraco when importing data. So your dashboard solution is the best option. I will come up with a new Custom dataAdapter special for Blog4Umbraco in the future that is using the same approach.
I recently had to back date some blog posts/date folders. I took a copy of Richards excellent content maintanance package and added option to set create date. If anyone wants it then post here and i will put up download link
You can download my updated version from http://www.box.net/shared/sfdrerea5g" target="_blank">here its a zip file with source, the compiled dll is in the bin directory. To install just copy over the dll to bin and the usercontrol to usercontrols and overwrite existing.
On the dashboard control there is create date text box just add new date to that then update. Ps I have been using dd/mm/yyyy format, in my web.config I have in globalization tag culture="en-GB" for different date cultures guess that tag would need to be updated. It was a quick hack I did for a client who needed to back date quite a few posts.
Earlier in this thread I suggested using a custom property "postdate" that you could have full control over. But my suggestion didn't get any comments/votes so it might have been a bad one :-)
If you think it's a bad suggestion I would very much like to know what your thoughts are on this as I'm going to use "postdate" on a large implementation. Are there any disadvantages?
This is what I wrote:
The date of content probably matches the create date in most cases but not all. And it's not likely to be the last published date either if you just updated a spelling error.
How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:
change a date for a post that was created earlier but wants to be posted as of today
change dates of imported posts
ensure correct date to scheduled posts
This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.
Think your suggestion should be implemented in Blog4Umbraco,for now it's nice to know you can modify the createdate property using the API. With UmbImport 1.0.3 you can map against the createdate.
But this will not solve all the issues. Currently the datefolder is attached to the document Create event. This must be changed to the document.before save event to solve all the issues.
I successfully imported my blog posts with the correct create date and everything, but they're not going into date folders. Is that a disconnect between Blog4Umbraco and UmbImport? Are the blog posts only placed in date folders when first created, not re-published?
Yes - the blogposts are only placed in datefolders when created (document_new). But I guess that this is really a question about umbImport using the API or not?
Richard, thanx for the vote. Care to comment on the above?
Just to add my 2c worth.. i think the PostDate property is a good idea, however for blogs its usefulness is limited as you would need to manually change the date folders too for everything to stay in sync... so probably not ideal.
Richard, was it you that created the package that allowed you to create a new blog post, and specify a date, and it then went and created the date folders and create date accordingly? If not, perhaps we should dig that out and modify it to work with the new blog package...
I'm pretty keen to start my blog fresh with the new package, but need a way to bring my old posts in, so hoping to find a solution... an upgrade path or script would have been nice.. ( poke @ core team :P )
Note that I manually backdated some posts by doing the following:
change the create date in the umbracoNode table
enable DateFolder
to be created under Blog and DateFolder, and enable Blog Post to be
created under DateFolder
Create date folders under the Blog page for each month/date you need
Move the posts into the right folders.
Publish blog and all children
Worked a treat.
However I did notice that the Monthly Archive seems to not work at all! The XSLT seems to list all blog items (ignoring date) regardless of which month folder you are looking at. To fix this I edited BlogListPosts.xslt and removed all instances of "ancestor-or-self::node [@nodeTypeAlias = 'Blog']/" - This makes it loop through only children of the month folder you are viewing.
A similar solution (but changed to streamline the automatic folder creation) has been submitted to codeplex for possible inclusion in the next release.
backdating posts or importing posts
I understand that there is currently no import feature for blog4umbraco, so I am attempting to add backdated posts. What I've done is altered the blog, datefolder document types to allow manual creation of date folders. Then added my date folders & finally created blog posts within them.
Now the posts show up allright but they're dated with the create date not the folder date. I've tried altering the createdate in the database (cmsContentXml) for the records in question, also tried clearing the cache by deleting umbraco.config, but no luck, the create date still shows up as today.
I'm sure I've done something similar a couple of months ago on another site with an earlier version of blog4umbraco, but now I'm really stuck.
Any advice please?
Hi Claire,
I had to do exactly the same thing as you in december for a client of mine upgrading from v3 to v4 and I am pretty sure I did exactly as you have done.
Have you tried to un-publish and re-publish?
It sounds like a caching issue.
Cheers,
Chris
I've had this problem as well. Always uses the create date instead of the publish date. I'll be digging into this soon as a client coming up will need this functionality.
Also, scheduling didn't work when I was testing it. Should that work?
The date of content probably matches the create date in most cases but not all. And it's not likely to be the last published date either if you just updated a spelling error.
How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:
This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.
/Jesper
**NEWBIE** I also need to back date posts for the last 4 years. Is there any easy way to perform this action in blog4Umbraco? It is important to the client that the old posts exist in the correctly dated file structure within the blog. Any help would be greatly appreciated!
Don
Thanks Chris for the unpublish hint. After much mucking around I'm now halfway there, but still struggling.
I find that if I create the folder/blog post but not publish it, then change the createDate in umbracoNode table, then publish, the date shows up allright on the blog post itself.
However I'm still having trouble with the archive pages. The backdated month shows up on the archive list, but the month's page lists entries from that month of *this* year as well as the backdated year, and the dates under the older posts use the later date, not the date I changed before.
There are createDate & updateDate fields in umbracoNode and in ContentXml tables. Don't like modifying the database & wish I could figure out what's the minimum required to get this happening. Even so it's still a big job to manually add the contents of even a small blog.
This is turning out to be quite a pickle. Going to have to take a break from it & come back to it later.
Does anyone know if there there any plans to provide an import or backdating functionality, as it sure seems like something that would be very useful!
+ 1 for being able to change the date of posts. It doesn't seem possible currently to enter historical posts to a new blog currently, which has been crucial in both projects I've tried to use this for so far.
Hi
It's a bit complex problem. To change the create date is pretty easy. You can set the CreateDateTime property on the Document object for that using the API. Only problem is that this doesn't solve the archive case. The tree folder structure that Blog4Umbraco is using is based on the create document event and you don't have access to the CreateDateTime property when this occurs.
I was thinking about this problem for umbImport and came up with an Idea to create a dummy import folder. Imported documents could be stored then in this folder and when it's imported an after Import event can be used to to move the document to the correct Datefolder. This is just a theory, but I think this should work. I'll create a blogpost/package about this some time.
Cheers,
Richard
instead of displayign the createdatetime you can use the folder's to get the date:
// yyyy-mm-dd
<xsl:value-of select="umbraco.library:FormatDateTime(concat(./../../../@nodeName,'-',./../../@nodeName,'-',./../@nodeName) , 'd MMM yyyy')" />
Then if you create the folders manually it will format the date based ont he fodler structure
I've also been trying to upgrade my blog, with some frustration...
I have used Richards umbImport with a custom rss data adapter, http://www.richardsoeteman.net/2009/04/16/CreateACustomDataAdapterForUmbImportPart1.aspx
This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items.
I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...
Cheers
Evan
I've also been trying to upgrade my blog, with some frustration...
I have used Richards umbImport with a custom rss data adapter, http://www.richardsoeteman.net/2009/04/16/CreateACustomDataAdapterForUmbImportPart1.aspx
This method imports all of the content with the correct 'createdDate' but you still have to manually edit the dateFolder structure and fix up the tags and media items.
I'm looking at importing with this method to a temp folder then using a dashboard usercontrol to create a datefolder/post content structure somehow...
Cheers
Evan
HI Evan,
Unfortunately I have no influence on the Date structure of Blog4Umbraco when importing data. So your dashboard solution is the best option. I will come up with a new Custom dataAdapter special for Blog4Umbraco in the future that is using the same approach.
Cheers,
Richard
Guys,
I recently had to back date some blog posts/date folders. I took a copy of Richards excellent content maintanance package and added option to set create date. If anyone wants it then post here and i will put up download link
Regards
Ismail
Made some slow progress with my solution...It is partially working but still needs a lot of work.
Ismail, It would be good to see your approach.
Richard - I'm looking at customising the Blog4Umbraco Date structure in the Event Handler. Time is my enemy at the moment :)
Regards
Evan
Evan,
You can download my updated version from http://www.box.net/shared/sfdrerea5g" target="_blank">here its a zip file with source, the compiled dll is in the bin directory. To install just copy over the dll to bin and the usercontrol to usercontrols and overwrite existing.
On the dashboard control there is create date text box just add new date to that then update. Ps I have been using dd/mm/yyyy format, in my web.config I have in globalization tag culture="en-GB" for different date cultures guess that tag would need to be updated. It was a quick hack I did for a client who needed to back date quite a few posts.
Regards
Ismail
Thanks Ismail, that works great.
I also found this post which may be helpful,
http://our.umbraco.org/forum/using/ui-questions/5774-Editable-date-for-Blog4Umbraco-1x-%28short-how-to%29
Cheers
Evan
Hi all,
Earlier in this thread I suggested using a custom property "postdate" that you could have full control over. But my suggestion didn't get any comments/votes so it might have been a bad one :-)
If you think it's a bad suggestion I would very much like to know what your thoughts are on this as I'm going to use "postdate" on a large implementation. Are there any disadvantages?
This is what I wrote:
The date of content probably matches the create date in most cases but not all. And it's not likely to be the last published date either if you just updated a spelling error.
How about adding a field "post date" that is editable. It could default to createdate. This would ensure that you could:
This would mean that most places where the date is used in the package needs to be updated. All xslt files and the datefolder events too I guess.
/Jesper
Hi Jesper, voted your answer up :).
Think your suggestion should be implemented in Blog4Umbraco,for now it's nice to know you can modify the createdate property using the API. With UmbImport 1.0.3 you can map against the createdate.
But this will not solve all the issues. Currently the datefolder is attached to the document Create event. This must be changed to the document.before save event to solve all the issues.
Cheers,
Richard
I successfully imported my blog posts with the correct create date and everything, but they're not going into date folders. Is that a disconnect between Blog4Umbraco and UmbImport? Are the blog posts only placed in date folders when first created, not re-published?
Hi Robert,
Yes - the blogposts are only placed in datefolders when created (document_new). But I guess that this is really a question about umbImport using the API or not?
Richard, thanx for the vote. Care to comment on the above?
/Jesper
Hey all,
Just to add my 2c worth.. i think the PostDate property is a good idea, however for blogs its usefulness is limited as you would need to manually change the date folders too for everything to stay in sync... so probably not ideal.
Richard, was it you that created the package that allowed you to create a new blog post, and specify a date, and it then went and created the date folders and create date accordingly? If not, perhaps we should dig that out and modify it to work with the new blog package...
I'm pretty keen to start my blog fresh with the new package, but need a way to bring my old posts in, so hoping to find a solution... an upgrade path or script would have been nice.. ( poke @ core team :P )
Bump!
Note that I manually backdated some posts by doing the following:
Worked a treat.
However I did notice that the Monthly Archive seems to not work at all! The XSLT seems to list all blog items (ignoring date) regardless of which month folder you are looking at. To fix this I edited BlogListPosts.xslt and removed all instances of "ancestor-or-self::node [@nodeTypeAlias = 'Blog']/" - This makes it loop through only children of the month folder you are viewing.
Andy
I discussed a solution for automatically back dating posts on my blog, including some code.
http://deeper.webangelo.net/2010/4/9/blog4umbraco-post-date.aspx
A similar solution (but changed to streamline the automatic folder creation) has been submitted to codeplex for possible inclusion in the next release.
--Chris
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.