How to update AIML version from 1.0.1 to AIML 2.0 - aiml

Current application is using AIML version 1.0.1 and I want to update it to 2.0 . The xml files are having the code like -
<aiml version = "1.0.1" encoding = "UTF-8">
<aiml>
<category>
<name>URL</name>
<pattern>Example link*</pattern>
<template>Here is the Link !
<hyperlink href="https://example.com"target="_blank">Click Here</hyperlink>
<id>URL1</id>
</template>
</category>
</aiml>

Which bot are you using?
AIML 2.0 is fully compatible with 1.0

Documentation about AIML (including AIML 2) is available here: https://pandorabots.com/docs/aiml-reference/
Your example category can now be simplified to this, using the <link> tag
<category>
<pattern>Example link</pattern>
<template>Here is the Link !
<link>
<text>Click here</text>
<url>https://example.com</url>
</link>
</template>
</category>

Related

how can I deeplink an app from Google Assistant?

I'm creating a dialogflow agent integrated with Google Assistant.
What I'd like to do is to open an app (my app) when a proper intent is matched. I've seen that actions like Youtube, Spotify etc. are able to do that, for example I can tell the Youtube action "search for cats video" and the Youtube app will open with a list of cats videos.
I tried to use the DeepLink class but I then noticed it's deprecated.
DeepLink class
Is there any way you can suggest me to do this?
Thanks in advance
I think you are looking for App Actions. Here are the steps you need to follow:
Find the right built-in intent. actions.intent.OPEN_APP_FEATURE should be the right one for you.
Create and update actions.xml. It should look like
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a sample actions.xml -->
<actions>
<action intentName="actions.intent.OPEN_APP_FEATURE">
<!-- Use url from inventory match for deep link fulfillment -->
<fulfillment urlTemplate="{#url}" />
<!-- Define parameters with inventories here -->
<parameter name="feature">
<entity-set-reference entitySetId="featureParamEntitySet" />
</parameter>
</action>
<entity-set entitySetId="featureParamEntitySet">
<!-- Provide a URL per entity -->
<entity url="myapp://deeplink/one" name="featureParam_one" alternateName="#array/featureParam_one_synonyms" />
<entity url="myapp://deeplink/two" name="featureParam_two" alternateName="#array/featureParam_two_synonyms" />
</entity-set>
</actions>

Sitecore 8.1 Update 2 - URL's can't be generated from display name

We upgraded our solution from Sitecore 8.1 Update 1 to Update 2. Our URL's are generated from display name and that was working fine.
But after upgrading, the behaviour changed to URL generation from item name although ShowConfig.aspx still shows "useDisplayName="true" for .
We're using the following config:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<linkManager defaultProvider="sitecore">
<providers>
<clear/>
<add name="sitecore">
<patch:attribute name="addAspxExtension">false</patch:attribute>
<patch:attribute name="useDisplayName">true</patch:attribute>
<patch:attribute name="languageEmbedding">never</patch:attribute>
<patch:attribute name="alwaysIncludeServerUrl">true</patch:attribute>
</add>
</providers>
</linkManager>
</sitecore>
Now all links only show a 404. What am I missing?
We tried on an empty solution and it's the same behaviour. So it is a Sitecore bug.
We contacted Sitecore Support. They introduced a new setting in Update 2 in Sitecore.config.
<setting name="ItemResolving.FindBestMatch" value="DeepScan" />
This setting needs to be set to:
<setting name="ItemResolving.FindBestMatch" value="Disabled" />
It was supposed to solve the following bug:
96805: Item could have been unresolved with specific encodeNameReplacement and wildcard/display name resolving logic
This is now registered as a bug with the reference number 105324.

Sitecore 8.1 Upgrade Media section broken

I upgraded sitecore from 7.0 to 8.1. The only real problem I have ran into is the media section is broken and the images appear broken on the site itself.
The weird part and I can upload and download the media items. It is broken in both chrome and firefox.
Thanks]1
Update
<encodeNameReplacements>
<replace mode="on" find="&" replaceWith=",-a-," />
<replace mode="on" find="?" replaceWith=",-q-," />
<replace mode="on" find="/" replaceWith=",-s-," />
<replace mode="on" find="*" replaceWith=",-w-," />
<replace mode="on" find="." replaceWith=",-d-," />
<replace mode="on" find=":" replaceWith=",-c-," />
</encodeNameReplacements>
It looks like a problem with Sitecore Media Protection (included first time in Sitecore 7.5).
You can read more about it in Adam blog post "Do not turn Sitecore Media Request protection off and protect older Sitecore versions with ImageGuard".
But I don't know why hashes are not added to the links in Sitecore. It should be disabled for the Sitecore internal sites (e.g. shell, login, etc).
Try to disable media protection by changing the config in /App_config/Include/Sitecore.Media.RequestProtection.config file and see if this is the reason of your problems.
Fixed it. It turns out the way sitecore is configured has changed a lot between 7-8.1. By adding
<sitecore configSource="App_Config\Sitecore.config" />
and removing the old section fixed the problem.
You are missing a replacement:
<replace mode="on" find=" " replaceWith="-" />
It can cause problems in images request, if you are using spaces in media item names.
Add it to your section
Another thing to see is if your CustomHandler section is like this:
<customHandlers>
<handler trigger="-/media/" handler="sitecore_media.ashx" />
<handler trigger="~/media/" handler="sitecore_media.ashx" />
<handler trigger="~/api/" handler="sitecore_api.ashx" />
<handler trigger="~/xaml/" handler="sitecore_xaml.ashx" />
<handler trigger="~/icon/" handler="sitecore_icon.ashx" />
<handler trigger="~/feed/" handler="sitecore_feed.ashx" />
</customHandlers>
This is the same of "Configuration Files Changes" especified by Sitecore Upgrade 8.1 IR
One of the new changes in 8.1 is the change of the default prefix from "~" to "-". It could be related to this prefix change. If you take the URLs that are getting a 404 and replace the ~ with a -, do the URLs to media work?

Exclude nodes based on attribute wildcard in XSL node selection

Using cruisecontrol for continuous integration, I have some annoyances with Weblogic Ant tasks and how they think that server debug information are warnings rather than debug, so are shown in my build report emails. The XML output from cruise is similar to:
<cruisecontrol>
<build>
<target name="compile-xxx">
<task name="xxx" />
</target>
<target name="xxx.weblogic">
<task name="wldeploy">
<message priority="warn">Message which isn't really a warning"</message>
</task>
</target>
</build>
</cruisecontrol>
In the cruisecontrol XSL template the current selection for the task list is:
<xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/>
What I would like is something which selects the tasklist in the same way, but doesn't include any target nodes which have the attribute name="*weblogic" where * is a wildcard. I have tried
<xsl:variable name="tasklist" select="/cruisecontrol/build//target[#name!='*weblogic']/task"/>
but this doesn't seem to have worked. I'm not an expert with XSLT, and just want to get this fixed so I can carry on the real development of the project. Any help is much appreciated.
In the cruisecontrol XSL template the
current selection for the task list
is:
<xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/>
What I would like is something which
selects the tasklist in the same way,
but doesn't include any target nodes
which have the attribute
name="*weblogic" where * is a wildcard
Use:
/cruisecontrol/build
//target
[not(substring(#name, string-length(#name)-7)
= 'weblogic'
)
]/task

Download specific version of a file from SharePoint using web services

Can someone provide a sample for downloading a specific version of a file from SharePoint using web services? Normally I would get the file with the Copy Web Service (.../_vti_bin/copy.asmx). But I don't really know how to specify a version.
Regards
Anton Kalcik
You can use the Versions web service to get which versions exist for a File
The GetVersions method will give you an xml like this:
<results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<list id="{26E516B0-8241-4B97-984D-000000000000}" />
<versioning enabled="1" />
<settings url="http://Server_Name/Site_Name/_layouts/
1033/LstSetng.aspx?
List={26E516B0-8241-4B97-984D-000000000000}" />
<result version="#4" url="http://Server_Name/Site_Name/
Shared Documents/File_Name.doc"
created="6/7/2003 5:55 PM" createdBy="DOMAIN\User" size="19968"
comments="" />
<result version="1" url="http://Server_Name/Site_Name/
_vti_history/1/Shared Documents/File_Name.doc"
created="6/7/2003 5:49 PM" createdBy="DOMAIN\User" size="19968"
comments="" />
.
.
.
</results>
You can then just use a HTTP GET request for the content of the "url" attribute of the "result" node for the right version
Here's the exact thing you want to do, with code:
Article