Publishing from the Details View
Hello,
I've recently been working through the creation of a Locations module. I've implemented the Content Lifecycle into the module, and thought it was working. I have a "publish" button that appears when all of my module items are listed out, and clicking it does cause the publish event to occur. However, I've added a button to my details view for my module, in the definitions file, as so:
toolbarSectionElement.Items.Add(
new
CommandWidgetElement(toolbarSectionElement.Items)
Name =
"SaveChangesWidgetElement"
,
ButtonType = CommandButtonType.Save,
CommandName = DefinitionsHelper.PublishCommandName,
Text = (isCreateMode) ? String.Concat(
"Create Location"
) :
"Publish"
,
WrapperTagKey = HtmlTextWriterTag.Span,
WidgetType =
typeof
(CommandWidget)
);
Hi,
Can you please let us know of the exact steps you have taken for reproducing the issue. It looks like the exception might be thrown on purpose (i.e. to notify that usage of this functionality is not intended in that particular item state), however I'd like to investigate this behavior further. Thanks in advance for your kind cooperation.
Regards,
Boyan Barnev
the Telerik team
Unfortunately, I cannot give a step-by-step breakdown, as this question was posted last week, and I can't accurately retrace my steps. I can tell you that I implemented the Content Lifecycle into my module, by way of following the Agents module in the SDK. I've put my item into a "Draft" status, by Saving it from my details page. Then, If I attempt to publish from the details screen it says "Operation 'publish' is not supported at this time". However, If, instead of going to the details form, I use the "publish" link from the listing, it does publish as expected. This behaviour persists when the item status is "Unpublished" as well.
actionsColumn.MenuItems.Add(DefinitionsHelper.CreateActionMenuCommand(actionsColumn.MenuItems,
"Publish"
, HtmlTextWriterTag.Li,
"publish"
,
"Publish"
,
string
.Empty));
Looking at the SDK products module, it seems that it doesn't use Publish in this context. So, does Sitefinity require that a save be done, then a publish be called from the listing?
Is there more information you need that I can offer? Would you like copies of my classes? I can certainly make that available if it will expedite the support process.