Hi. I have similar problem but <classes> do not fix the problem. I'm trying to prefill the servicesubcategory (and servicecategory) field in UserRequest Form in Portal side.
<?xml version="1.0" encoding="UTF-8"?><itop_designxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="3.0"><classes><classid="UserRequest"_delta="must_exist"><methods><methodid="PrefillCreationForm"_delta="define"><static>false</static><access>public</access><type>Overload-DBObject</type><code><![CDATA[ public function PrefillCreationForm(&$aContextParam) { parent::PrefillCreationForm($aContextParam); $iSubcategoryId = 5; // Set a specific servicesubcategory_id $this->Set('servicesubcategory_id', $iSubcategoryId); // Get the ServiceSubCategory object to also set the service_id $oSubcategoryObject = MetaModel::GetObject('ServiceSubCategory', $iSubcategoryId, false); if ($oSubcategoryObject) { $this->Set('service_id', $oSubcategoryObject->Get('service_id')); } } ]]></code></method></methods></class></classes><!-- Portal module design --><module_designs><module_designid="itop-portal"xsi:type="portal"><bricks>...
I also have a folder classes and UserRequestExtended.php file in side it.
In your extension, file module.xxx.php in the dependecies , have you said that your module must be loaded AFTER the module which brinks the User Request class ?
By the way, the first implementation in XML is enough. I don't understand the second one which would have no effect
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Error loading module "prefill-extension": /itop_design/class[UserRequest] at line 3: could not be found - Loaded modules: dictionaries:1.0, core:1.0, application:1.0, authent-cas:3.1.0, authent-external:3.1.0, authent-local:3.1.0, combodo-autoclose-ticket:1.0.1, combodo-backoffice-darkmoon-theme:3.1.0, combodo-cmdbchange-cleaner:1.0.4, combodo-email-synchro:3.6.0, combodo-password-expiration:1.0.1, combodo-workflow-graphical-view:1.1.0, itop-attachments:3.1.0, itop-backup:3.1.0, itop-config:3.1.0, itop-data-collector-ldap:1.0.7, itop-files-information:3.1.0, itop-object-copier:1.4.3, itop-portal-base:3.1.0, itop-portal:3.1.0, itop-profiles-itil:3.1.0, itop-sla-computation:3.1.0, itop-standard-email-synchro:3.4.2, itop-stencils:1.0.6, itop-structure:3.1.0, itop-themes-compat:3.1.0, itop-tickets:3.1.0, itop-welcome-itil:3.1.0, molkobain-portal-mosaic-service-catalog:1.0.0, templates-base:3.5.1, authent-token:2.1.1, combodo-db-tools:3.1.0, itop-config-mgmt:3.1.0, itop-core-update:3.1.0, itop-datacenter-mgmt:3.1.0, itop-endusers-devices:3.1.0, itop-faq-light:3.1.0, itop-hub-connector:3.1.0, itop-incident-mgmt-itil:3.1.0, itop-knownerror-mgmt:3.1.0, itop-oauth-client:3.1.0, itop-problem-mgmt:3.1.0, itop-request-mgmt-itil:3.1.0, itop-service-mgmt:3.1.0, itop-storage-mgmt:3.1.0, itop-virtualization-mgmt:3.1.0, prefill-extension:1.0.0
and module
When installing the extension, an error pops up, although I have connected the module that is required for UserRequest
Hello Dmitry,
It's most likely that you are missing the
<classes>
node in your XML. Try this instead:Hope it helps,
Guillaume
Yes, my bad, thanks for the help
Glad you could fix it :)
Hi. I have similar problem but
<classes>
do not fix the problem. I'm trying to prefill the servicesubcategory (and servicecategory) field in UserRequest Form in Portal side.I also have a folder classes and UserRequestExtended.php file in side it.
Any help appreciated 🙏
In your extension, file module.xxx.php in the dependecies , have you said that your module must be loaded AFTER the module which brinks the User Request class ?
By the way, the first implementation in XML is enough. I don't understand the second one which would have no effect
Thank you for the answer. I didn't realize that I needed to set dependencies like that. Adding itop-request-mgmt-itil solved the problem.