Facing issue with createTkbArticle GraphQL mutation
Hi, I am using the client credentials to make a server to server GraphQL api call to create a tkb article in one of the tkb board. But I am getting the following Error, for which I see no discussion in the forum or docs. Even Google doesn't show any results. Errors: [ { "message": "Exception while fetching data (/createTkbArticle) : lithium.util.NullArgumentException: defaultErrorType", "locations": [ { "line": 2, "column": 3 } ], "path": [ "createTkbArticle" ], "extensions": { "classification": "DataFetchingException" } } ] I am making the call from a node-express app, and just in case if it helps I am sharing the code snippet : const createTKBArticleMutation = ` mutation createTkbArticle($createInput: CreateTkbArticleInput!) { createTkbArticle(createInput: $createInput) { result { id } errors { __typename ... on NotValidPossibleValueError { message } ... on PermissionDeniedError { message } ... on InvalidHtmlError { message } ... on CustomFieldNotDefinedForEntityError { message } ... on RequiredCustomFieldNotSet { message } } } } `; const createTKBArticleVariables = { createInput: { subject: "Testing GraphQL TKB creation", body: "This article is created using GraphQL API, for testing the API itself.", // teaser: "This is a test teaser for the TKB article", // introduction: "This is a test introduction for the TKB article.", board: { id: "board:knowbler_tkb" } } }; const method = 'POST'; // const query = fetchTKBBoardsQuery; const query = createTKBArticleMutation; const options = { url: GRAPHQL_ENDPOINT, method: method, headers: { Authorization: `Bearer ${creds.accessToken}`, 'Content-Type': 'application/json' }, data: JSON.stringify({ query: query, variables: createTKBArticleVariables }) }; const response = await axios(options);224Views
Sign in to react to this post0Comments
only show component if tkb article has a specific label
Hi All, I'm trying to develop a component that only shows up when a tkb article has a specific tag. I 'm new to freemarker and liql. This is what I have so far <#assign labels = webuisupport.path.parameters.name.get ("label-name","") /> <#if label??> <#list labels as label> ${label.text} </#list> </#if> <#if env.context.message.id??> <#assign messageId = env.context.message.id )> <#else> when-missing</#if> Neither of these seem to retrieve the labels. Any idea's or solutions? Thanks Kind regards, ErikSolved1.2KViews
Sign in to react to this post5Comments
change date in tkb-p to last updated date
Hi all, Does anybody know how to change the dates that are listed underneath each topic in the list on a tkb-p overview page? By default is seems to show the creation date, I would like to change this to the last updated date.628Views
Sign in to react to this post1Comment
Any public examples of Wiki-esque TKB's?
We don't currently use TKB's - but from what I can tell, there's not a whole lot of "structure" but possibly a couple components that could help. But today a contributor proposed an idea that would be natural in a wiki (or a TKB with some sort of page-like structure.) Do any of you have examples of TKB's with navigation I can use for inspiration?541Views
Sign in to react to this post1Comment
set default searchGranularity
Hi all, I was looking to set the search granularity default option to search only in TKB when the knowledge base was selected. I came up with this code and added this to a custom component. The custom component was added to the category_page. <#-- Sets the default search for knowledge center and TKB --> <#-- the coreNode.id will differ in your env. This is the id of nodes you wish to add this code to --> <#if coreNode.id == "<your node id>"> <@liaAddScript> ; (function ($) { $("#searchGranularity").val("<value you want to select>|category").change(); })(LITHIUM.jQuery); </@liaAddScript> </#if> <#-- the coreNode.id will differ in your env. This is the id of the nodes you wish to add this code to --> <#if coreNode.id == "<your node id>"> <@liaAddScript> ; (function ($) { $("#searchGranularity").val("<value you want to select>|tkb").change(); })(LITHIUM.jQuery); </@liaAddScript> </#if> Feel free to add comments and improvemetns. If you like this, kudos are alwayse nice!264Views
Sign in to react to this post0Comments
Create different CSS styles for category pages
We want to change the way our KB articles are shown to our customers. We do not want to show the author information for the article on any Khoros KB page. I have been able to hide the author in the below pages through css https://communitystag.lansweeper.com/t5/requirements/tkb-p/kb_requirements https://communitystag.lansweeper.com/t5/requirements/scanning-commands-run-on-linux-computers/ta-p/7940 What I cannot figure out, though, is how to hide the author from these pages. https://communitystag.lansweeper.com/t5/knowledge-center/ct-p/Knowledge_Center https://communitystag.lansweeper.com/t5/knowledge-base/ct-p/KB_Main The category pages are for the knowledge base only. We don’t want to hide the author information for the forum or other category pages. Is there a way to hide the author information for the category pages (ct-p) for only the ct-p pages related to the knowledge base?Solved771Views
Sign in to react to this post2Comments
ReST API call to Edit Message Author
I am working on changing the status of Ideas and adding the comments via ReST API call. I am able to achieve this using the details provided by Akenefick (Discussion link: https://community.khoros.com/t5/Developer-Discussion/Idea-Exchange-Status-and-Comment-Update-via-ReST-API/m-p/670166#M18255). Now, I would like to change the author of the last comment from my service account to a community user, so any reply to that comment can be notified to that user. I did try the call as below mentioned in few discussions, but this will not update the author but only updates the last_edit_author. And any reply to this comment would not get the user [koushikniranjan] any notifications. Has anyone tried this and worked for them? Or any better approach? {{API_PATH}}/restapi/vc/messages/id/131270/edit?message.author=login/koushikniranjanSolved1KViews
Sign in to react to this post4Comments
- SuzieH4 years agoKhoros Alumni (Retired)
koushikniranjan I heard back from an Engineer who works with message creation/editing. We don't currently support changing the original author of any message via UI or API. We do have a similar business story in our backlog to cover use cases like
- As a Community Manager, when the author of an article leaves the community, I want to assign another member as the owner so that the article is updated regularly and maintained.
- As a Blogs Lead, I want the draft an article and publish on behalf of a CXO/Senior leader so that the author of the article is shown as CXO.
It seems like this would work for your use case as well and I will add a reference to this point in the ticket. The story hasn't been picked up yet, though, and we don't have a timeframe for when it will be.
Sign in to react to this post
Components Available for TKB Card Article
Is there a list somewhere of components available to use in the TKB Article Card that is used as a parameter for the TKB Article List? I see these are there any others? message-view.widget.subject message-view.widget.teaser helpfulness-display ratings.widget.internal-rating-display ThanksSolved724Views
Sign in to react to this post3Comments
- SuzieH4 years agoKhoros Alumni (Retired)
HI Akenefick
I heard back from the Engineering team. Thanks to AdamA for the quick response.
The TKB Card Article quilt supports all sub-components allowed in our Responsive Message View components. All of the allowed sub-components for the message views are listed on this page under the "Sub-components used in message views" section.
Sign in to react to this post
Creating comments using the REST API
Is it possible to post a new comment to a TKB article using the REST API? I could not find a way to do this. The only API I found was to post to a board or reply to a message. I found no way to add a comment (perhaps the reply API will work if the interaction style is TKB?).878Views
Sign in to react to this post3Comments
tkb
9 TopicsYou’ve seen all recent content