Menu

[Portal] Unable to show objects with a field of type AttributeLinkedSet pointing to an abstract base class

Markus
2023-11-30
2024-11-21
  • Markus

    Markus - 2023-11-30

    While working on a customised portal I encountered a problem with showing objects that have a field of type AttributeLinkedSet where the target class is an abstract base class, e.g. PhysicalDevice.

    I was able to reproduce this behaviour with the attached minimal extension, where I just want a brick that shows all objects of class Brand.

    The list ist shown properly, but whenever I klick one of the objects I end up with

    Oops! An error has occured.
    Cannot instantiate abstract class PhysicalDevice

    And with 'log_level_min' => LogAPI::LEVEL_TRACE, in the configurations I get the following message in error.log

    2023-11-30 10:02:16 | Trace | | SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' | cmdbsource |||
    2023-11-30 10:02:16 | Trace | | Registering Listener 'Combodo\iTop\Core\EventListener\AttributeBlobEventListener::OnAttributeBlobDownloadActivateTrigger' for event 'EVENT_DOWNLOAD_DOCUMENT' source '' from '' | EventService |||
    2023-11-30 10:02:16 | Trace | | Registering Listener 'Combodo\iTop\Attachments\Hook\EventListener::OnAttachmentDownloadActivateTriggers' for event 'EVENT_DOWNLOAD_DOCUMENT' source 'Attachment' from '' | EventService |||
    2023-11-30 10:02:16 | Trace | | Fire event 'APPLICATION_EVENT_METAMODEL_STARTED - []' | EventService |||
    2023-11-30 10:02:16 | Trace | 1 | Fire event 'EVENT_LOGIN - {"code":0,"state":"connected"}' | EventService |||
    2023-11-30 10:02:16 | Trace | 1 | Fire event 'EVENT_DISPLAY_OBJECT_DETAILS - Brand::7_65684f989b7056.603273 {"debug_info":"from: Brand:7","object":{}}' | EventService |||
    2023-11-30 10:02:16 | Trace | 1 | Fire event 'EVENT_DB_SET_ATTRIBUTES_FLAGS - Brand::7_65684f98a2ce27.133982 {"target_state":"","debug_info":"from: Brand:7","object":{}}' | EventService |||
    2023-11-30 10:02:16 | Trace | 1 | Fire event 'EVENT_DB_OBJECT_RELOAD - Brand::7_65684f98a2ce27.133982 {"debug_info":"from: Brand:7","object":{}}' | EventService |||
    2023-11-30 10:02:16 | Error | 1 | Cannot instantiate abstract class PhysicalDevice | Error |||
    array (
    'exception class' => 'Error',
    'file' => '/--REDACTED--/core/metamodel.class.php',
    'line' => 7055,
    'uri' => 'http://--REDACTED--/pages/exec.php/object/view/Brand/7?exec_module=itop-portal-base&exec_page=index.php&portal_id=itop-portal',
    )

    I did a fresh install of iTop version 3.1.0-2-11973 built on 2023-08-02 14:25:30 in "demo mode", and then installed my minimal extension attached here (only changes are in datamodel.sample-extension.xml).

    How to reproduce
    * Install iTop
    * Install the attached extension
    * Switch to the portal with user Admin
    * Click on the Brick "Brands"
    * Click on one of the shown brands

    Right now I'm not sure if I'm doing something wrong or if there might be a problem in the code of iTop.

     
  • Guillaume Lajarige

    Hello Markus,

    That's a very detailed explanation, thanks! We'll look into it.

    Guillaume

     
    • Markus

      Markus - 2023-11-30

      Thanks for your swift reaction, Guillaume.

      If you need more information, feel free to ask.

       
      👍
      1
    • Markus

      Markus - 2024-01-10

      Dear Guillaume,

      it has been a while.

      Are there any news on this?

       
  • Guillaume Lajarige

    Hello Markus,

    I wrote this message back then but never it send, sorry!

    Bug is tracked in our internal bug tracker under N°7024.
    I don't know when it will be fix, but it will be reviewed next week.

    Take care,
    Guillaume

     
    • Markus

      Markus - 2024-01-11

      Dear Guillaume,

      I'll do the same thing from time to time ;).

      Thanks for the update!

       
    • Markus

      Markus - 2024-02-01

      Dear Guillaume,

      as I haven't seen any branch related to 7024, I assume this issue is in backlog and not being worked on currently?

      Don't wanna pressure anyone, It's just about getting a rough idea at which date I might be able to move to 3.1 and how to plan my tasks (not) related on the move.

      Cheers,
      Markus

       
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-02

    Hello,
    We're not sure for now of the solution. The bug will be worked on on next 3.1.2 version, at least to evaluate and decide what to do.

     
    • Markus

      Markus - 2024-02-05

      Thx for the update, Pierre!

       
  • Markus

    Markus - 2024-08-22

    Dear all,

    just to be on the safe side:

    I've seen the commit message

    N°7024 - Fix opening an object with abstract class indirect linked set in Portal

    and said commit is part of the branch tags/3.2.0.

    In addition I do not find any reference to my issue in https://www.itophub.io/wiki/page?id=3_2_0:release:beta-known-issues .

    Can I expect that this will work as expected once I upgrade to 3.2.0 (or higher) ?

    Cheers,
    Markus

     
  • Guillaume Lajarige

    Hello Markus,

    Yes, your issue will be resolved when upgrading to iTop 3.2.0+.
    The link you are refering to is the list of the regressions introduced during the development of the 3.2.0 versions that had to be solved before the final relese.

    You'll find your ticket in the change log of the 3.2.0 here :)

    Take care,
    Guillaume

     
    • Markus

      Markus - 2024-08-23

      Thanks!

       
    • Markus

      Markus - 2024-08-23

      Thanks!

       
  • Romain Quetiez

    Romain Quetiez - 2024-09-05

    Fixed in 3.2.0, released today.

     
    • Markus

      Markus - 2024-11-21

      Thanks for the info Romain!

      I was finally able to look into it again, an the issue is fixed for me now.

      Not sure how to set this thread to SOLVED though.

      All the best
      Markus

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.