Hidden content on content manager

I use the javascript library to create a content. Enonic creates the content successfully however, I don’t watch this new content on the content manager. I think that is being created on the master branch but it didn’t create on the draft branch and this is the reason because I can’t watch this content
Best regards

Not sure if this is a question? But to be short - content will be created in your contextual branch unless otherwise specified. Currently, admin only lists items in draft branch, but we are working to implement support for showing the items of the master branch too for a full diff view. Screenshot below:

Hope this helps…

1 Like

@tsi: houldn’t content in the master branch always be available in the draft branch as well?

As I don’t think there is a way of “publishing” from master branch to draft branch, the current implementation would make sure the draft branch never will be able to “catch up”.

I suggest that content should always be created in the draft branch, and then optionally be auto-published immediately.

1 Like

Jup… That is another solution we’re working on. We will enable a “publish/push” function that let’s you write, say to draft first, and then push it to master - and everything would be fine (also no possible conflicts when writing to draft first).

I tried to find a function that allow me to publish/push a content from the draft branch but I didn’t find it. When do you think that function will be released?

This problem was discussed in this thread.

I solved my specific problem by creating a content in draft, then calling a custom service that in turn calls the rest interfaces in admin in order to publish content.

1 Like

This is not a solution one can live with in production as:
a) user must be logged in with access and permissions for admin
b) user must have publish permissions for the content at hand

In 6.3 we are introducing a new “run” library in the API that lets you “sudo” a chain of commands, and run them with a different set of priveliges… We are working on delivering a publish/push function as well!

The publish service can have its own privileges and do the publish operation purely server-side. Then, the user does not have to be logged in with admin permissions nor publish permissions. We don’t even have to expose the site/admin hierarchy to the internet for this to work.

That said, I’m looking forward to checking out the new library in 6.3 :relieved: Client-side creation of content has been a bit of a challenge so far.