Schedule Publish/Unpublish
Hi,
In news module Schedule Publish/Unpublish with past seems has no effect, news listed by publication_date.
Thanks
Hello mkavici,
By design you cannot publish an item with a date in the past or earlier than the date created. The behaviour you describe is expected.
I will create request to be able to publish items with a date in the past and will forward it to our UX team for review.
Ok,
Any advise to import to sitefinity with past news from old web site?
Thanks
Hi mkavici,
You can change the PublicationDate programmtically after you publish the news item
var newsAll = App.WorkWith()
.NewsItems()
.Where(nI => nI.Status == ContentLifecycleStatus.Live)
.ForEach(nI =>
var val = DateTime.UtcNow.AddDays(-10);
nI.PublicationDate = val ;
)
.SaveChanges();
A handy feature would be a recurrence option that would ignore the year. For instance, for news announcements where you have a set start and end dates in a given year that you accept funding applications or holiday news items that occur on the same day(s) every year. Thank you.
Hi Darrel,
Your request has been logged and will be reviewed when we discuss improvements to the News module.
Thanks for your suggestion for improvement!
Best wishes,
Kalina
the Telerik team
The fact that this is "expected" behavior is ridiculous. Obviously, there are tons of scenarios where you would want a Publication Date to show up in the past. Importing past press releases, changing a date sort order, etc. Fix this soon, please.
I'd like to have this functionality working soon as well. We are moving 20+ websites to sitefinity, all of which will have backdated news.
A more troubling behavior is that it seems to change the Publication date after you update the news post. Wait, what? Not cool!
Hello Developer,
Thank you for contacting us.
This issue is already added in our issue tracking system. The item ID is 5774
Regards,
Antoaneta
the Telerik team
Does the publish/unpublish work at all in 4.0? Even if i set it to publish on a future date it still shows up. Is there something i have to set in the control itself?
We are actaully using the Products module and if I set the date for May 23, 2011 it actually says "Scheduled publish on 23/05/11" and it shows up today.
after further testing, i think that if the item is published first, then you late go back in and set the publish date to the future, it doesn't unpublish it for you. You have to unpublish it first. Then set the date to the future..... ideally it shouldn't it "unpublish" the item if the date is reset to the future??
Hi Laura,
Thank you for contacting us.
I am not able to reproduce this problem with Sitefinity 4.0, so I assume that it appears only in the Products module. I will log this bug in our system for fixing.
By design, if you open one published item and schedule it to publish in the future, the item will not be unpublished. The assumption is that you are creating a newer version of the content and you want it published in the future.
As we received various feedback on this dialog we decided to improve its behavior. In the future, when changing the date of publication, you will be able to choose whether you want the item to be unpublished or not.
Best wishes,
Antoaneta
the Telerik team
I hope this feature does make it onto some new version.
We are rebuilding a current website into sitefinity and I am creating the news items from their current site. Of course i want the dates to be the same dates as they are from the current web site!
So this is still not possible to put a publish date in the past? And we are using "Sitefinity 4.2.1650.0 SE"
I believe it would be a very useful feature. Thank you.
The item ID 5774 had been marked as resolved and people still complain about that.
I really can not understand Sitefinity team. 7 month passed after I have opened this thread and there is no change yet!
Where do the Sitefinity team live? on Mars? Please come back to Earth! This problem has been solved many many years ago in many CMSes! Wordpress, Textpattern Jommla, .netnuke and many many others do this for many many years...
How can you expect people to update news date from db? so you mean that only tech people can use Sitefinity?
You do the same mistake on upgrading from 3.7 to 4.x. Still there is not a successful way to upgrade. You make your existing customers sad and keep adding new buggy features.
Really really can not understand and I'm sure nobody can understand!
This may be sill for me not to know but, where exactly do i run this code? I think I read somewhere that all you need to do is create a page in VS with the code. Do I then put a button on the page to run it? Is that how it works?
Hi Laura,
Yes, like you properly pointed out you can place the code in any *.aspx web form in your project and run it, the code will execute automatically.
Kind regards,
Boyan Barnev
the Telerik team
Thank you. Does it matter that we are running the site as a Web Project and not a Web Application?
I ask because of App.WorkWith() in the code.
Hi Laura,
No, you should not worry about that. App is the entry point for working with the SItefinity Fluent API, so as long as you have a reference: using Telerik.Sitefinity; in your class, there should be no problems using the provided code sample.
Best wishes,
Boyan Barnev
the Telerik team
Hi Laura,
No, you should not worry about that. App is the entry point for working with the Sitefinity Fluent API, so as long as you have a reference: using Telerik.Sitefinity; in your class, there should be no problems using the provided code sample.
Best wishes,
Boyan Barnev
the Telerik team
Hi all,
Just a quick follow-up. As we're currently working on implementing the feature in Sitefinity for the upcoming releases, we've prepared a short sample, that should make backdating your News (content items) easier. Please check the attached WebForm and short video demonstrating its functionality. Please feel free to modify the sample to suit your use case scenario (e.g. you can simply change the App.WorkWith()
.NewsItems() to work with any desired content items that have PublicationDate and DateCreated properties, let's say:
App.WorkWith()
.BlogPosts() )
Hi,
Schedule Publish/Unpublish is still buggy!
Please check attached image. If you publish a document (not only document this also happens in other content items) at past, document is not published immediately.
I don't know how
scheduler works but it it will wait schedule date (which is already past) the it will never be published.
Regards
In my case it is working for default language(en) but if any news exist in arabic but not in english then this problem produce.
using sitefinity 5.2
Hi,
You should first set the language in which you will modify the items. You can do that by changing the current culture. This way you will get the items in this language.
CultureInfo backupCulture = System.Threading.Thread.CurrentThread.CurrentUICulture;
CultureInfo cult =
new
CultureInfo(
"bg"
);
System.Threading.Thread.CurrentThread.CurrentUICulture = cult;
//Do work
System.Threading.Thread.CurrentThread.CurrentUICulture = backupCulture;
// return to initial culture
Hi,
Posting news articles in the past is still not possible, right? Please confirm.
Thanks
Taha,
Depends on your version but when you create a news item, don't hit Publish. Instead click on More Actions then Publish/Unpublish on Specific Date.
Select that date it should be published on (in the past) and click on Save.
It should then take you back to the News list grid page.
I noticed that in the latest version (7), after it creates the news item, it says scheduled to publish on 11/3/2013 (past date). So I published it (clicking on Actions, Publish) and the published date stayed as 11/3/2013.
The Date listed in the column in the backend is the create date and not the published date so that would show as today's date.
Hi Laura,
Thanks for your response. We're running 6.2 and I don't think the publication date remains the one set for scheduled publication. We want the news articles to have a chronological order on the frontend, using the built-in module we're ordering them by Publication Date.
It seems like the past news articles will never be published.
Thanks for stepping in, Laura.
Looks like we can either publish this using the API, or give the user the ability to publish all past news at their set PublicationDate if that information is stored properly in the database. Or we can create a custom field and sort by this field on the frontend.
Go to:
List Settings>Sort news
And make that "As set in the advanced mode".
Then Go to:
Advanced>ControlDefinition >Views >NewsFrontendList>SortExpression
And set it to "YourSortingField DESC" for instance.
It should sort them properly.
Hello,
If you want to publish items in the past as required in a previous thread reply please follow this blog post. You can change the culture as shown in a previous reply in this thread. The items will appear as Draft but after publishing the Publication date will still be the date in the past set when created programmatically.
Regards,
Nikola Zagorchev
Telerik
Hi Nikola,
Ideally we don't want to do this programmatically, but when we set a specific date of publication then go back to the News and publish, the publication date is today's date rather what has been set.
Thanks
Hello,
Could you please specify on what version of Sitefinity you are testing? I tested on Sitefinity 7.0 and I was able to publish on a specific date in the past directly from the back-end.
Regards,
Nikola Zagorchev
Telerik
Hello Nikola,
We're working on 6.2
Thanks
Hello Taha,
I was able to create a News item with a publication date in the past using this code snippet in Sitefinity 6.2 for Spanish language:
CultureInfo backupCulture = System.Threading.Thread.CurrentThread.CurrentUICulture;
CultureInfo cult =
new
CultureInfo(
"es"
);
System.Threading.Thread.CurrentThread.CurrentUICulture = cult;
App.WorkWith().AnyContentItem<NewsItem>().CreateNew().Do(
n =>
n.Title =
"Sample item in past"
;
n.UrlName =
"sample-item-in-past"
;
)
.Publish(
new
DateTime(1978, 4, 15))
.SaveChanges();
System.Threading.Thread.CurrentThread.CurrentUICulture = backupCulture;