1

I have followed this technet tutorial on how to create a catalog site collection and a publishing site collection as well as how to turn the list into a product catalog and connect it on the publishing site.

After connecting my catalogs the corresponding Category and Catalog Item pages are created, i.e. for my Educational Resources list the following Pages are created:

  • Category-Educational-Resources
  • CatalogItem-Educational-Resources

The category itself in the metadata term set is called Educational Resources. If I click Educational Resources in the top nav it directs me to myurl/educational-resources, as expected and displays the two items that exist in that catalog (will contain more once I get it working).

If I click on one of the items it takes me too myurl/educational-resources/1/EDR1Educational%20Resources

The form it is to follow it ItemGroup/ItemNumber, but the item number is only EDR1 and I cannot figure out why each category and their items is appending the Item Category to the end of the URL for items, in my example above 'Educational Resources', the Item Category, was appended to the end.

Accessing this URL brings up a blank page. If I modify the url to be myurl/educational-resources/1/EDR1 I see the catalog item details as you'd expect.

Can anyone tell me why the search index (and thus the category links) are pointing to the wrong URL and how I can fix this so that the item category is not appended to the end of the URLs?

I have published a major version for both the category and item pages.

Update as per comment regarding search results Edit webpart ond category page, change query

You can see in the screenshot that the Item Category is being appended to the end of the URL when being indexed (my guess). I have tried manually defining the URL format on the catalog connection as: myUrl/[ProductCatalogGroupNumberOWSTEXT]/[ProductCatalogItemNumberOWSTEXT]

The Construct a URL format was: myUrl/Term Root/Term/[ProductCatalogGroupNumberOWSTEXT]/[ProductCatalogItemNumberOWSTEXT]

Update with screenshots showing what I get when using Construct a URL format from catalog properties Page I see when clicking an item: Page I see when clicking an item

Page I'd expect to see and do when I remove the appended category from URL: Page I'd expect to see and do when I remove the appended category from URL

I appreciate all the help, Thanks, Devin

8
  • The URL rewriting for items pages is part of connecting the managed catalog. Go into Site settings > manage catalog connections > <catalog link> > Catalog Item URL Format.
    – Rothrock
    Commented Oct 3, 2016 at 21:32
  • Hi @Rothrock looking at the catalog source settings it has, as I would expect, the column that categorizes items for navigation as owstaxidProductCatalogItemCategory (cannot change), Make URLs relative to this site selected, and Contruct a URL format from catalog properties selected with the selected fields being, from top to bottom, ProductCatalogGroupNumberOWSTEXT, ProductCatalogItemNumberOWSTEXT. This makes the URL underneath appear as myurl/Term Root/Term/[ProductCatalogGroupNumberOWSTEXT]/[ProductCatalogItemNumberOWSTEXT]. No mention of category after the ItemNumber property in URL.
    – Devin
    Commented Oct 4, 2016 at 14:31
  • That is very strange. What if you try the to manually define the URL format instead of using the construct option? Just try some different versions to see if it rewrites them all consistently or if it always adds the category to the end. Also it seems that you shouldn't get a blank page, but a page not found errror. Do you actually have a scheme in your managed navigation that would place a page at the wrong url? You can check the querytemplate in the item page layout. It might be using the wrong urltoken.
    – Rothrock
    Commented Oct 4, 2016 at 14:54
  • If I use the manual option and set the url as myUrl/[ProductCatalogGroupNumberOWSTEXT]/[ProductCatalogItemNumberOWSTEXT] I am then presented with Page not found instead of a blank page. If I edit the category page myUrl/educational-resources and view the query for the web part I notice that in the result preview it is showing the URLs as incorrect with the item category appended to the end. I'll place the screenshot in the main body of my question, so I thought it was something to do with the way search was indexing my catalog?
    – Devin
    Commented Oct 4, 2016 at 15:20
  • Search should be rewriting the url to whatever you have specified in the manage catalog settings. There are two problems, the first is getting the url rewrite to work the second is making a "page" at that location. It is like you are trying to hit two different targets. The URL rewriting and the managed navigation for item pages don't actually "talk". When you change it manually are the urls changing to what you have specified -- even if they give a page not found error?
    – Rothrock
    Commented Oct 4, 2016 at 15:26

1 Answer 1

0

After working through things with @Rothrock I started thinking, maybe the property I am using for the item number isn't right. I wanted to see what the value is and came across how to view managed property value using search rest api.

Based on that I accessed the content type and property I wanted (actually shows all properties): _myUrl/api/search/query?querytext=%27contenttype:Educational%20Resources%27&selectproperties=%27ProductCatalogItemNumberOWSTEXT%27

Scrolling through I found the following in the XML:

<d:element m:type="SP.KeyValue">
    <d:Key>ProductCatalogItemNumberOWSTEXT</d:Key>
    <d:Value>EDR2 Educational Resources</d:Value>
    <d:ValueType>Edm.String</d:ValueType>
</d:element>
<d:element m:type="SP.KeyValue">
    <d:Key>UsageAnalyticsId</d:Key>
    <d:Value>EDR2</d:Value>
    <d:ValueType>Edm.String</d:ValueType>
</d:element>

As it turns out ProductCatalogItemNumberOWSTEXT isn't what I wanted. Changing my URL structure to use UsageAnalyticsId instead made it work as expected. To me that seems deceiving and I do not believe this was mentioned in any tutorial I read.

So if I construct my URL after connecting the catalog I can select UsageAnalyticsId (cannot select this on the catalog site). This makes the URL example underneath appear as:

myUrl/Term Root/Term/[ProductCatalogGroupNumberOWSTEXT]/[UsageAnalyticsId]

And gives me the desired result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.