Skip to content

Class definition with class name: SaameProduct not found #171

Description

@max-zhang78

Affected Version

2025.4 - LTS

Affected capability

Data Objects

Steps to reproduce

studio ui
If the class of object is changed from Product to ProductDemo, the following interface will report an error

Affected api
pimcore-studio/api/data-object/grid/available-columns?classId=1&folderId=5957
pimcore-studio/api/data-object/grid/available-columns-for-relation?classld=1&relationField=Component
pimcore-studio/api/data-object/grid/available-columns-for-relation?classld=18relationField=Bundle
pimcore-studio/api/data-object/grid/available-columns?classld=1&relationField=Accessories
pimcore-studio/api/data-object/grid/available-columns?classld=1&relationField=Successor
pimcore-studio/api/data-object/grid/available-columns?classld=1&relationField=Predecessor

The temporary fix method is to change the Product in var/classes/definition-ProductDemo. php to a Product Demo

I have a question. If there are some custom elements in var/config/object_custom_layouts/* yaml, will it affect the generated definition-ProductDemo. php file?
If there is no impact, it is more certain that it is a bug

executing bin/console pimcore: build: classes still has issues

error info
{
"message": "Class definition with class name: Product not found",
"errorKey": "error_element_not_found",
"detail": "#0 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Grid/Column/Collector/DataObject/AdvancedColumnCollector.php(269): Pimcore\Bundle\StudioBackendBundle\Class\Repository\ClassDefinitionRepository-\u003EgetClassDefinition(\u0027Product\u0027)\n#1 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Grid/Column/Collector/DataObject/AdvancedColumnCollector.php(253): Pimcore\Bundle\StudioBackendBundle\Grid\Column\Collector\DataObject\AdvancedColumnCollector-\u003EbuildRelationFields(Object(Pimcore\Model\DataObject\ClassDefinition\Data\ManyToManyRelation))\n#2 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Grid/Column/Collector/DataObject/AdvancedColumnCollector.php(89): Pimcore\Bundle\StudioBackendBundle\Grid\Column\Collector\DataObject\AdvancedColumnCollector-
\u003EgetRelationFields(Array)\n#3 /var/www/html/vendor/pimcore/studio-backend-bundle/src/Grid/Service/ColumnConfigurationService.php(106): Pimcore\Bundle\StudioBackendBundle\Grid\Column\Collector\DataObject\AdvancedColumnCollector-\u003EgetColumnConfigurations(Array)\n#4 /var/www/html/vendor/pimcore/studio-backend-bundle/src/DataObject/Controller/Grid/GetAvailableColumnsController.php(98): Pimcore\Bundle\StudioBackendBundle\Grid\Service\ColumnConfigurationService-\u003EgetAvailableDataObjectColumnConfiguration(\u00271\u0027, 5957, Object(Pimcore\Model\User))\n#5 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): Pimcore\Bundle\StudioBackendBundle\DataObject\Controller\Grid\GetAvailableColumnsController-\u003EgetDataObjectAvailableGridColumns(Object(Pimcore\Bundle\StudioBackendBundle\DataObject\MappedParameter\AvailableGridColumnParameter))\n#6 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel-\u003EhandleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n#7 /var/www/html/vendor/symfony/http-kernel/Kernel.php(193): Symfony\Component\HttpKernel\HttpKernel-\u003Ehandle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#8 /var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel-\u003Ehandle(Object(Symfony\Component\HttpFoundation\Request))\n#9 /var/www/html/vendor/autoload_runtime.php(32): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner-\u003Erun()\n#10 /var/www/html/public/index.php(16): require_once(\u0027/var/www/html/v...\u0027)\n#11 {main}"
}

Actual Behavior

studio ui
If the class of objecy is changed from Product to ProductDemo, the following interface will report an error

Expected Behavior

no api error

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    Platform Version

    2025.4 - LTS

    Affected capability

    Data Objects

    Galaxy

    None yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions