I use Liferay 6.1.1-ce-ga2 bundled with Tomcat server and Oracle 10g database.
My goal is to insert some content, as Journal Article, and display them in an Asset Publisher (with a structure and template, already working).
I used JournalArticleServiceSoap.addArticle(...) with the right fields (groupid, structureid, templateid, ...). The contents are "correctly" inserted in the database and I can see them inside web contents from administrator content panel. The contents have also "Approved" as status. This is done by setting:
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH)
However, I can't see the inserted contents displayed with the other contents in the Asset Publisher, until I open it again for edition and click on publish button (even without changing nothing). Then the content is published as expected. The problem is the number of contents. It is about 600 so I can't to this action for each one.
I do not understand what is the matter and how to figure it out? In other words, what do I have to do to make the web-content inserted by web service display automatically in Asset Publisher?
Or, what does the "Publish" do exactly so I can try to reproduce programmatically with SOAP service (or SQL after insertion)?
Thank you in advance for your help.
I've also posted the same question in Liferay' forum: Problem to display JournalArticle inserted by SOAP web service
you can try to log the database accessing from Liferay and see what will be changed after you save article manualy. Herefor set the logging level of hibernate to info or debug.
are you setting serviceContext like this?
ServiceContext serviceContext = new ServiceContext();
serviceContext.setAddGuestPermissions(true);
serviceContext.setAddGroupPermissions(true);
serviceContext.setScopeGroupId(groupId);
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH);
You must setting serviceContext Like This:
ServiceContext serviceContext = new ServiceContext();
//serviceContext.setAddGuestPermissions(true);
//serviceContext.setAddGroupPermissions(true);
serviceContext.setScopeGroupId(groupId);
serviceContext.setWorkflowAction(1);
serviceContext.setIndexingEnabled(true);
serviceContext.setIndexingEnabled(true); is Very Important.
The following code is not must requeired.
serviceContext.setAddGuestPermissions(true);
serviceContext.setAddGroupPermissions(true);
Related
Getting below error while browsing CD site (Web DB) in sitecore.while browsing CMS site it's works fine.What could be the issue .We have restored the web db from master still facing same issue.
Error :
The layout for the requested document was not found
Most likely causes:
The resource you are looking for (or one of its dependencies) may have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
What you can try:
Go back to the previous page
Go to the start page
Additional Information:
Requested URL: /mysite/res/book
Requested Layout: {62A89386-861F-5210-9568-H8CADA118FFB}
Requested Device: Default
If the page you are trying to display exists, please check that an appropriate prefix has been added to the IgnoreUrlPrefixes setting in the web.config.
If the url works on your CM box and doesn't work on CD box, it looks like something is not published.
Try:
Login to your CM server and publish the whole site again with Republish everything option selected.
If 1. doesn't help, login to Sitecore Desktop, switch to the web database, navigate in Content Editor to the item you want to see. Check if the item is there and if presentation details are correct.
If item is NOT in web or layout is not in web database, switch back to master database and check if publishing restrictions are applied or if the item is in the final state of a workflow.
If the item and layouts are in the web database but the url still doesn't work, check your sites configuration in /sitecore/admin/showconfig.aspx whether your site is not restricted to some host names.
I added a new user attribute to my LDAP schema, and configured user-mgt.xml to support the new custom ObjectClass.
Then I used the Claim Management UI, and managed to succesfully set the new attribute to be displayed and Supported by default.
Now it all works: I checked that the new claim is correctly setup in the registry db, and whenever I edit a user profile I can view and edit the new custom attribute.
The question is: Can I set this straight up from some xml configuration file?
My problem is that even I edit claim-config.xml and change the parameters to the corresponding claim in the http://wso2.org/claims dialect to be Supported, and give it a DisplayOrder, it has no effect.
I would like not to depend much on the GUI and registry status, but rather rely on configuration files.
Thanks
You can not edit claim-config.xml file add new claims, if the server has been started once. Only 1st startup, it would populate all claims in to the database (you can delete the database and edit the file and start, then also it would populate). Then you can only edit or add them through management console UI. However, if you know about Identity Server, all these UI functions have been exposed via web service API. If you does not like UI, you can do it using automating web service call... Basically SOAPUI can be used for this purpose.
Folks,
I'd like to have something like the following in our service registry.
I'd like to add a field to the UI that when I click on it in the UI, it does a select from the database and creates a popup with the data returned from that database select.
is this possible?
For instance, I'd like to have a button on the UI page for a service that when clicked, goes to the database and gets all "METHODS" of the service (I would have previously populated customized database fields after analyzing the service definition, and this button would execute a customized select statement to pull the required data out of the db).
I am not entirely clear about what your requirements is but i think this might help take look at the doc for RXT[1] and see if you can solve your requirement with that :).
[1] http://docs.wso2.org/wiki/pages/viewpage.action?pageId=22185121
Thanks,
Pulasthi
I delete the defualt home node and create another node called Home Page. And when I type http://[instance name] sitecore gives me an error shows that no layout found. ![enter image description here][1]
I can us the page editor and page content normally. But when i type the http://[instance name]in the browser, it doesn't show the default page. Why?
I am just a fresh in Sitecore, please be more specific.
Error:The layout for the requested document
was not found.
Most likely causes:
The resource you are looking for (or one of its dependencies) may have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
What you can try:
Go back to the previous page
Go to the start page
More information
I usually hit this issue when I have a fresh install and haven't done a publish yet. Publishing gets the master and web in sync, and given that your Page Editor experience is fine it seems like your Master is in good state but Web is not.
It could be that your new Home node doesn't have a layout attached to it. If you log on to Sitecore's Content Editor and go to the Presentation tab -> Details, do you see anything assigned to the Default device?
If you do, it might be because you still need to publish your changes. If you don't, try attaching the layouts (there's some sample layouts as well that come with Sitecore to check if that's the issue).
Do the checks that Trayek suggests, but also check if your site definition and hostname are set correctly in the /app_config/include/sites.config (or directly in the web.config, however this it not the recommended way) to make sure you have attached the correct instancename to your site root.
Furthermore, switch in the Sitecore client to the web database and check the assigned presentation on your home item, it might be a publishing issue.
Is it possible that you have the wrong "startItem" parameter in your site configuration? You have to set it to the correct item that should be visible wenn entered without an url (/)
I suppose you should check the Web.Config configuration tag.
Please check, in there, there are startitem attibutes for various sites in there. change them to your startItem and try it out.
Hope this helps!
Do let us know -- whether it works or not.
Regards,
Varun Shringarpure
I have been tasked with creating a web service(usingVS2010) to query TFS (2010) by the workitem number. The user would access the web service, then type in the workitem number and project name and hit a go button. This would call the web service, retrieve the title, and description and display it for the user on a seperate application. So starting this process I thought I would create a simple console application that does the same thing. I was able to connect to the server and I am able to see the collection of project that exists. What I am looking for is some help in querying the Server so that I can type in a number and get a response in my console. Does anyone have any examples, or direction or websites? While I wait for an answer I will be searching the web. Thanks in advance.
You'll want to use the TFS SDK to query work items programmatically.
Ewald Hoffman has posted an excellent example of how to get a work item by ID:
Part One discusses how to get connected to your server
Part Two shows how to query for a work item by ID.