Issue with Cloned Widget - Knowledge Result

Rob Sestito
Mega Sage

Hey SN Comm Team,

I have been in the mix of hiding Author from the portal - which I was able to do in the grand scheme of things and received additional help earlier today in hiding the author from widgets.

Now, I am trying to do this still with different widgets. Specifically, the Knowledge Result widget. This is an OOTB Widget with read-only policy in it. Therefore I am unable to modify the server script to comment out the line(s) showing author.

I have cloned this widget to be my own, commented out ONLY the line(s) in the server script that are showing author.

When I use the cloned widget, all that shows is the small picture of the backend of our test instance:

Page Editor:

find_real_file.png

Actual page after a search:

find_real_file.png

The OOTB Knowledge Result widget works just fine - except the part with me being able to modify to hide author.

Suggestions? Help? I have cloned widgets before and never had this happen.

Thanks,

-Rob

1 ACCEPTED SOLUTION

Found a much easier solution - system property: glide.knowman.search.show_author. Set the value to False and the search results using the OOTB widget Knowledge Result worked. No more author showing!

Thanks for the help today, Jake!

-Rob

View solution in original post

5 REPLIES 5

Jake Sadler
Kilo Sage

Hi,

 

Author is mentioned on line 106, 107,130 and 131.

 

Have you commented all those lines out?

 

Thanks

 

Jake

Hey Jake -

Well that currently isn't my issue. I have not a clue why the widget would be showing what looks like a little screenshot of the backend header of our test instance.

That part is not making sense to me.

To also answer your question though, yes I did comment those lines out after cloning the widget.

		//if(gs.getProperty('glide.knowman.search.show_author','false') == 'true')
		//	fields.push('author');
		if(gs.getProperty('glide.knowman.search.show_view_count','false') == 'true')
			fields.push('sys_view_count');		
		if(gs.getProperty('glide.knowman.search.show_last_modified','false') == 'true')
			fields.push('sys_updated_on');
		if(gs.getProperty('glide.knowman.search.show_published','false') == 'true')
			fields.push('published');
		if(gs.getProperty('glide.knowman.show_unpublished','false') == 'true'){
			fields.push('workflow_state');
			options.show_unpublished = true;
		}
		if(gs.getProperty('glide.knowman.search.show_rating','false') == 'true')
			fields.push('rating');

		fields.push('external');

		return fields;
	}

	function getSocialFieldsfromProperties(){

		//Generate secondary fields based on legacy properties
		var fields = [];
		//if(gs.getProperty('glide.knowman.search.show_author','false') == 'true')
		//	fields.push('profile');	
		if(gs.getProperty('glide.knowman.search.show_view_count','false') == 'true')
			fields.push('views');
		if(gs.getProperty('glide.knowman.search.sh

Thank you -

-Rob

Hi,

 

I have managed to replicate the error and there is a OOB script include called KBViewModel that calls another script include called KBViewModelSNC.

 

KBViewModelSNC pushes a lot of information about the author through to the widget so you will need to go over that script include to comment out the parts calling the author information.

 

I recommended copying the OOB script and renaming it and calling it into your custom widget with your script modifications.

 

Thanks

 

Jake

Hey Jake,

Thanks for the help investigating - I will check that out and let you know if this corrects it for me.

Thanks,

-Rob