Hi,
I wonder whether somebody here could bring some light into this…
I am trying to get my head around creating a new packacke 'eharvest' for MySource Matrix. I simply followed what I found in the 'news' package, and modified 'package_manager_news.inc' and 'package.xml' accordingly to make them right for my new package. (Or at least what I believe is right…)
After that I created a folder 'Reports' for my new reports asset. I tried to follow the tutorial 'better_user' on the Matrix website and changed the stuff around to suit my new package. Running the command 'sudo php install/step_03.php . --package=eharvest' produces the following error message:
'Unable to update "reports". Parent is different between asset.xml, reports.inc and reports_edit_fns.inc [SYS0254] |.
Here is code from the following files in my asset 'Reports:
asset.xml
<?xml version='1.0' encoding='UTF-8' ?> <?xml-stylesheet href="../../asset.xsl" type="text/xsl"?><asset_info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../asset.xsd"> <package>eharvest</package> <type_code>reports</type_code> <version>0.1</version> <name>eHarvest Reports</name> <description>A Simple asset to retrieve eharvest reports</description> <instantiable>yes</instantiable> <allowed_access>backend_user</allowed_access> <parent_type>page</parent_type> <flash_menu_path>Pages</flash_menu_path> </asset_info></pre><br />
'report.inc'
<?php// include the parent type, the user asset require_once SQ_CORE_PACKAGE_PATH.'/page/page.inc'; class Reports extends Page { /** * Constructor * * @param int $assetid the asset id to be loaded * */ function __construct($assetid=0) { parent::__construct($assetid); }//end constructor function printBody($print_form_tags=TRUE, $submit_buttons=TRUE, $form_action='') { ?> <h1>Eharvest Reports</><?php } }//end class ?></pre><br />
'reports_edit_fns.inc
<?php require_once SQ_CORE_PACKAGE_PATH.'/page/page_edit_fns.inc'; class Report_Edit_Fns extends Page_Edit_Fns { function __construct() { parent::__construct(); $this->static_screens['details']['force_lock'] = 'false'; }//end constructor }//end class ?>
Has anyone an idea what is going wrong with my code?
Thanks for your help,
Uwe