vhil / helpfulcore-wildcards

MIT License
3 stars 2 forks source link

Two item names returning same content #1

Open kmac23va opened 7 years ago

kmac23va commented 7 years ago

I'm trying to figure out why this might be happening, and I'm hoping maybe I can get some help here. I've got the wildcard module installed, but for two particular items when I call the wildcard path, they return the same item. One is the real item, the other name actually does exist but comes back with the first item. This happens even in experience editor - if I go to the item through content editor and click the experience editor button, I get the right one because the ID is used, but if I manually enter the name, I get the wrong item.

I tried rebuilding the link database and master/web indexes to see if that would help, and it seemed to, but now the problem is reversed. It's only two specific items, but I found if I delete/rename the bad item and create a new item with the same name, it still happens. So it's like the names are locked together somehow.

I don't see anything in the logs around this, so I'm not sure why it might be happening. I'm assuming the issues are around this module, but that's based on circumstantial evidence, so if it's something else, I'm willing the be corrected. :) Thanks for any help!

vhil commented 7 years ago

HI. Sorry for late response. This module uses ContentSearch API for getting items. So first question will be are you using Lucene or SOLR? You need to control the "Item Resolving Rules" field for building the query to ContentSearch. That may happen if you have spaces or dashes in your item names and search provider uses the tokenized search while resolving it. Consider to create a custom indexed field which would remove spaces and dashes and map that to your "Item Resolving Rules" field. Then you can look at default Search.log file and debug which queries are being executed for resolving items. You can try to execute those queries in your SOLR web interface or in any Lucene client. If that query returns more than one item, the module takes first of them.

If you drop me your route item I can try to help you.

daminipanchal commented 5 years ago

HI, I have installed your module in my sitecore instance.It is multi site solution and we are using virtualFolder to resolve different site urls.

For Example :

<site name="test-es" hostName="test.local" targetHostName="test.local" language="es-ES" database="web" virtualFolder="/es" physicalFolder="/es" rootPath="/sitecore/content/test" startItem="/Home" />

<site name="test-de" hostName="test.local" targetHostName="test.local" database="web" language="de-DE" virtualFolder="/de" physicalFolder="/de" rootPath="/sitecore/content/test" startItem="/Home" />

<site name="test-en" hostName="test.local" targetHostName="test.local" database="web" language="en" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/test" startItem="/Home" />

Site URLs: test.local/es test.local test.local/de

We are not able to resolve home item when we hit test.local/de or test.local/es. It is always resolving wildcard(*) Item.Let me know if you have any solution

vhil commented 5 years ago

Hi. I don't think I will have time to look at the issue, you are welcome to fork the repo and debug. I must say I didn't test this module with Sitecore 9, not sure it works out of the box...