MicrosoftLearning/mslearn-knowledge-mining

'Deploy to Azure' button for 07-exercise-add-to-index-use-push-api.md fails in Azure portal.

Closed this issue · 8 comments

Clicking the 'Deploy to Azure' button in exercise 7, "add to index use push api" fails in Azure portal.

The Custom Template editor in Azure portal displays the error message:
"There was an error downloading the template from URI 'https://raw.githubusercontent.com/MicrosoftLearning/mslearn-doc-intelligence/main/cognitive-search/azuredeploy.json'. Ensure that the template is publicly accessible and that the publisher has enabled CORS policy on the endpoint. To deploy this template, download the template manually and paste the contents in the 'Build your own template in the editor' option below. "

I attempted to access the template at the URL above and received a 404 error.

I was not able to find the template in the github project.

This is the same as in exercise 4 - Enrich an AI search index with custom classes.

Hi All,

In the same exercise 4 - Enrich an AI search index with custom classes, I am getting the error message below when trying to clone the repository.

Terminal Visual Studio Code
git clone https://github.com/MicrosoftLearning/mslearn-doc-intelligence movie-genre-function
Cloning into 'movie-genre-function'...
info: please complete authentication in your browser...
remote: Repository not found.
fatal: repository 'https://github.com/MicrosoftLearning/mslearn-doc-intelligence/' not found

I got a 404 when trying to copy and paste this URL into the browser.

Thanks in advance.

error in 4 should be fixed now, I'll look at 7 as time allows

Any progress?
https://learn.microsoft.com/en-us/answers/questions/1696370/missing-json-template-link-for-add-to-an-index-usi
Where is the link to the correct template? In which month and year is the fix expected?

The issue with the hyperlink to the JSON file on the webpage is due to the incorrect nesting of (anchor) tags. In HTML, an anchor tag cannot contain another tag. This improper nesting causes the hyperlink to malfunction and not display correctly. Here's a detailed explanation:

In the provided code snippet, the first list item (<li>) contains a paragraph (<p>) with two anchor tags nested within each other:

<p><a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure-Samples%2Fazure-search-knowledge-mining%2Fmaster%2Fazuredeploy.json"><a href="/mslearn-knowledge-mining/Instructions/media/08-media/deploy-azure.svg" target="_blank"><img src="/mslearn-knowledge-mining/Instructions/media/08-media/deploy-azure.svg" alt="Azure resource deploy button."></a></a> select this button to deploy all the resources you need in the Azure portal.</p>

Here, the first anchor tag () is meant to link to the JSON file, and the second anchor tag () contains an image () for the Azure deployment button. However, HTML does not support nested anchor tags. This incorrect structure causes the hyperlink to the JSON file to be non-functional.

To resolve this issue, you need to remove the nested anchor tag and ensure that the image is directly within a single anchor tag, like so:

<ol>
  <li>
    <p><a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure-Samples%2Fazure-search-knowledge-mining%2Fmaster%2Fazuredeploy.json" target="_blank"><img src="/mslearn-knowledge-mining/Instructions/media/08-media/deploy-azure.svg" alt="Azure resource deploy button."></a> select this button to deploy all the resources you need in the Azure portal.</p>

    <p><a href="/mslearn-knowledge-mining/Instructions/media/08-media/arm-template-deployment.png" target="_blank"><img src="/mslearn-knowledge-mining/Instructions/media/08-media/arm-template-deployment.png" alt="A screenshot of the arm deployment template with fields entered."></a></p>
  </li>
  <li>Under <strong>Resource Group</strong>, select <strong>Create new</strong>.</li>
  <li>Type <strong>acs-cognitive-search-exercise</strong>.</li>
  <li>Select the closest <strong>Region</strong> to you.</li>
  <li>For <strong>Resource Prefix</strong>, enter <strong>acslearnex</strong> and add a random combination of numbers or characters to ensure the storage name is unique.</li>
  <li>For the Location, select the same region you used above.</li>
  <li>At the bottom of the pane, select <strong>Review + create</strong>.</li>
  <li>Wait until the resource is deployed, then select <strong>Go to resource group</strong>.</li>
</ol>

With this correction, the hyperlink to the JSON file will function properly, and the Azure deployment button will be displayed as intended.

fixed with recent commit