I develop a website on Umbraco CMS for one year already.
I have a Search code which i take from old website to new one every time for year without any problem.
In this case I download Umbraco 7.3.1 and now when i try to check if content Has Property i'm getting FALSE even if the property exist.
Can someone please explain where is my mistake or how to solve it on the new version of Umbraco?
Example function:
public void GlobalSearch(DynamicPublishedContent content, string field, string searchTerm, StringBuilder sb)
{
try
{
if (content.HasProperty(field)) // Return always NULL!!! even the "Name" field
{
if (!string.IsNullOrEmpty(content.GetPropertyValue(field).ToString()))
{
SpecifyPageSearch(content, field, searchTerm, sb);
}
}
}
catch (Exception ex)
{
return;
}
}
Thanks in advance.