Friday 16 July 2004 12:34:42 am
I have tried the following: <b>Create a new package</b>
create PACKAGENAME SUMMARY
eg.
$php -C ezpm.php create staff "all the staff members"
Created package staff-1.0 all the staff members
<b>Show Information for package</b>
info PACKAGENAME
eg.
$ php -C ezpm.php info staff
Name : staff Vendor :
Version : 1.0 Source :
Release : 1 Licence : GPL
Summary : all the staff members State : alpha
eZ publish : 3.4 (3.4.1)
Description :
<b>List all packages</b> Includes all reporitories
list
eg.
$ php -C ezpm.php list
The following packages are in the repository:
...
....
....
<b>Editing Package information</b>
set PACKAGE ATTRIBUTE ATTRIBUTEVALUE
eg.
$ php -C ezpm.php set staff vendor "Kim Marshall"
Attribute vendor was set to Kim Marshall
<b>Adding classes, templates and objects to the package</b>
add PACKAGENAME contentobject [options] [path|node]
where options are:
--include-classes
Include class definitions in package (default)
--include-templates
Include related template files in package (default)
--exclude-classes
Do not include class definitions in package
--exclude-templates
Do not include related template files in package
--language
Comma separated list of languages to export.
If not supplied the value is taken from settings.
--current-version
Export only the published version for all objects. (default)
--all-versions
Export all versions for all objects.
--node-main
Export only main node for all objects. (default)
--node-selected
Export all nodes for all objects.
--siteaccess
Comma separated list of siteaccess to get definitions from, determines template override data and designs. If not supplied the value is taken from default siteaccess.
and path:
The path is chosen in the same manner as the URL alias which is shown in the path in the browser. If you want to export all objects under the node you must add /* to the end of the path
e.g. news/this_is_news ,news or news/* Note: To fetch the entire tree including users and media you must use an empty string, e.g. ''
$ php -C ezpm.php add staff contentobject --exclude-templates --exclude-classes "home/about_us/staff/*"
Adding node /home/about_us/staff to package
$ php -C ezpm.php add staff contentobject --exclude-templates --exclude-classes "home/about_us/elected_members/*"
Adding node /home/about_us/elected_members to package
$ php -C ezpm.php add staff contentobject "home/links/*"Adding node /home/links to package
Now it makes no sense to install this package on the site where it was created sicne all the classes, templates and objects allready exist there. But I tried it anyway.
$ php -C ezpm.php install staff-1.0-1.ezpkg
Failed importing package staff-1.0-1.ezpkg
And it failed. So then I tried installing a package from the "All" repository
$php -C ezpm.php install t13-3.4.1-1
Could not open package t13-3.4.1-1, none of these files were found: t13-3.4.1-1,t13-3.4.1-1.ezpkg
And it failed.
I haven't been able to work out the syntax for the export and import commands.
import: Import an eZ publish package. usage: import PACKAGE
export: Export a part of the eZ publish installation into a package.
usage: export TYPE [PARAMETERS]... [TYPE [PARAMETERS]...]...
Options: -o,--output FILE export to file But I did try
$php -C ezpm.php export staff
the command hung but did create a file staff-1.0.1.ezpkg Anyway, I gave up on import and export and just did this via the browser. Then tried to install the package on the site that I had just imported it to. However the package could not be found even though the list command showed it to be there.
$php -C ezpm.php install staff-1.0-1
Could not open package staff-1.0-1, none of these files were found: staff-1.0-1,staff-1.0-1.ezpkg
$ php -C ezpm.php list
The following packages are in the repository:
staff-1.0-1 (all the staff members)
....
So I gave up trying to do it all in command line (which I REALLY, REALLY want to do) and tried to do it all via the browser and got.
Fatal error: Call to a member function on a non-object in /home/ezpublish/sites/coomalie/kernel/classes/datatypes/ezurl/ezurltype.php on line 268
Fatal error: eZ publish did not finish it's request
The execution of eZ publish was abruptly ended, the debug output is present below.
I did manage to install one of the packages provided with eZpublish 3.4.0 on another more complex site and was surprised to see that when I uninstalled it the template files remained and took priority over those that we had defined. They also could not be deleted via the admin interface. I'd love to know if anyone has done this sucessfully.
|