function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vince301vince301 

Syndicate Knowledge url

I have set up Syndicated Knowledge (using the tab setup instructions) and included the code in my own website. The search works fine and it displays the Arctice names correctly, but the url defaults to my website so www.mywebsite/articles/ArticleType/article1 (so returns 404 page error). So it doesn't pick up the Sites url (which is setup correctly in custom settings). Any ideas?

CloudTronCloudTron

I ran into the same issue... Updating this post here so someone else running into this issue might find the following useful:

 

On troubleshooting this, I found the following bug in the code

 

Line 28 in the SyndicatedKnowledgeController is listed as

 

      if (!kbBaseURL.endsWith('/')) { kbBaseURL = kbBaseURL = '/'; }

 

So, if the url in your custom setting doesn't have a trailing '/', this line in effect updates your url to '/' and subsequent portions of the code then update it to /{articleType}/{articleURL}. And since the URL of your public KB is omitted, the links generated on your webpage point to a path within the context of your webpage (mywebsite.com/article/articleURL) resulting in a 404

 

Line 28 should be updated to:
   

      if (!kbBaseURL.endsWith('/')) { kbBaseURL = kbBaseURL + '/'; }

 

That resolved the issue for me.

 

Or, you can just include a '/' in the public KB URL in your custom setting.

 

Hopefully, Force.com Labs can update this and release a new version of Syndicated Knowledge in the AppExchange.

 

Thanks,

Raj