Custom string property returns null

Umbraco version 13.8

Custom property was created using angular.js (old way). This validates the numeric value calling API and stores the value as a string (default value-type). I verified the index and the umbracopropertydata table (value stored in intValue column). Both have the value. But it is null in UmbracoViewPage MODEL.

This was working fine and not sure when it stopped working. The application was recently upgraded from 13.5.2 to 13.6 in Feb 2025. I upgraded to 13.8 today just to test if the upgrade solves the issue and it didnt.

Now as a workaround, I created a service to search the node in external index and get the custom property value by culture. Workaround works, but doesnt look like a good solution.

I am not able to find the root cause the issue and fix it.

Please guide me to find what went wrong.

{
  "propertyEditors": [
    {
      "name": "Related Product",
      "alias": "relatedProduct",
      "editor": {
        "view": "~/App_Plugins/RelatedProduct/relatedProduct.html"
      }
    }
  ],
  "javascript": [
    "~/App_Plugins/RelatedProduct/relatedProduct.controller.js"
  ]
}

<div ng-controller="relatedProductController">
    <input type="text" ng-model="model.value" ng-change="search(model.value)" ng-blur="blur()" ng-keypress="keypress()"
           name="relatedProductField" />
    <span class="help-inline" val-msg-for="relatedProductField">{{model.message}}</span>
</div>

angular.module("umbraco")
    .controller("relatedProductController", function ($scope, $http, $timeout, angularHelper) {
        var form = angularHelper.getCurrentForm($scope);
        $scope.model.pending = true;
        $scope.search = function (productId) {
            if ($scope.model.pending) {
                angularHelper.getCurrentForm($scope).relatedProductField.$setValidity('relatedProductField', false);
            }
            const href = window.location.href;
            var url1 = "";
            const hashIndex = href.indexOf('?');
            if (hashIndex !== -1) {
                url1 = href.substring(hashIndex + 1);
            }
            else {
                url1 = href;
            }
            const urlParams = new URLSearchParams(url1);
            const locale = urlParams.get('cculture') ?? urlParams.get('mculture');
            var url = "products/" + productId + "_" + locale;
            if (productId === '') {
                form.relatedProductField.$setValidity('relatedProductField', true);
                $scope.model.message = '';
                $scope.model.pending = false;
            }
            if (productId !== '') {
                $http.get(url).then(function (response) {
                    if (response.status !== 200) {
                        form.relatedProductField.$setValidity('relatedProductField', false);
                        $scope.model.message = "Product with such ID wasn't found"
                        $scope.model.pending = false;
                    } else {
                        form.relatedProductField.$setValidity('relatedProductField', true);
                        $scope.model.message = '';
                        $scope.model.pending = false;
                    }

                })
            }
            $scope.model.value = productId;
            form.relatedProductField.$validate();

        };

        $scope.keypress = function () {
            $scope.model.pending = true;
            $scope.model.message = 'Searching for product';
        }

        $scope.blur = function () {
            if ($scope.model.pending) {
                form.relatedProductField.$setValidity('relatedProductField', false);
            }
        }
    });

ReferenceArticle.generated.cs

///<summary>
/// Related Product
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.8.0+a486d5d")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("relatedProduct")]
public virtual string RelatedProduct => global::Umbraco.Cms.Web.Common.PublishedModels.Article.GetRelatedProduct(this, _publishedValueFallback);

Article.generated.cs

///<summary>
/// Related Product
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.8.0+a486d5d")]
[global::System.Diagnostics.CodeAnalysis.MaybeNull]
[ImplementPropertyType("relatedProduct")]
public virtual string RelatedProduct => GetRelatedProduct(this, _publishedValueFallback);

/// <summary>Static getter for Related Product</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "13.8.0+a486d5d")]
[return: global::System.Diagnostics.CodeAnalysis.MaybeNull]
public static string GetRelatedProduct(IArticle that, IPublishedValueFallback publishedValueFallback) => that.Value<string>(publishedValueFallback, "relatedProduct");

Table umbracopropertydata

id versionId propertyTypeId languageId segment intValue decimalValue dateValue varcharValue textValue
902014 35876 163 1 NULL 10036526 NULL NULL NULL NULL

External Index