Try our conversational search powered by Generative AI!

Publishing content event issue

Vote:
 

Dear EPIServer Team,

I used the PublishingContent event for blocks to check the selected elements before publish. If something is wrong, the publishing is cancelled.

It works, if the content editor creates blocks in "Assets pane", tab "Blocks".

The validation doesn't work for blocks, which are created in the ContenrArea (link "create a new block"), because the

e.Content.ContentLink is empty.

How to get the e.Content.ContentLink during the publishing for blocks, which are created using link "create a new block"? 

 

#79746
Jan 03, 2014 9:53
Vote:
 

Ah, ok I know what's problem. 

Case 1: (Create block from asset tab)
1. Create content (get content link)

2. Publish content (listen on Publishing event with existed contentLink)

Case 2: (Create from create link inside content area)

1. Create + Publish content in one phase (so publishing event has content link is empty) => Problem! 

I think this is a bug, I'll report it.

//Ha Bui

#79753
Edited, Jan 03, 2014 11:22
Vote:
 

But I wonder a little bit: In Case 2 editor should has Publish access level, so what do you want to do in this case (I guess that properties/values of content is not enough in your case) ?

But anyway its still a bug because Publishing event with empty content link is not make sense!

//Ha Bui

#79754
Edited, Jan 03, 2014 11:31
Vote:
 

Eg., there is block, which has a link to a page. Content editor creates page, and forgets to publish it. Then he creates the block, set up the page as a link (but page is unpublished and it is not visible on site), publishes the block, and gets the error "Incorrect link".

 

Is there any build in attribute for property ContentReference to conrol that the content is published?

#79761
Jan 03, 2014 17:06
Vote:
 

Thank you for help )

#79762
Jan 03, 2014 17:06
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.