Git Product home page Git Product logo

teleport's Introduction

Teleport

Teleport is an extensible scripting toolkit for working with one or more local MODX Revolution installations.

Teleport currently functions primarily as a packaging toolkit which extends the MODX Transport APIs and provides commands for extracting and injecting customizable snapshots of MODX deployments. But it can be extended easily to perform an infinite variety of actions related to MODX.

MODX Revolution 3.x

Please use the 2.x branch and releases for MODX 3.x support.

Requirements

In order to use Teleport, your environment must at least meet the following requirements:

  • PHP >= 5.4
  • MODX Revolution >= 2.1 (MySQL)

You must also be able to run PHP using the CLI SAPI.

NOTE: At the current time, various Teleport Extract tpls only support MySQL deployments of MODX Revolution.

Usage on Linux environments with the PHP posix extension can take advantage of advanced user-switching features.

Teleport strives to be a multi-platform tool, and currently works equally well in Linux and OS X environments. Windows support is unknown at this time; Windows contributors wanted.

Installation

There are several methods for installing Teleport. The easiest way to get started is by installing the Teleport Phar distribution.

IMPORTANT: Using any of the installation methods, make sure you are running Teleport as the same user PHP runs as when executed by the web server. Failure to do so can corrupt your MODX site by injecting and/or caching files with incorrect file ownership.

Download and Install Phar

Create a working directory for Teleport and cd to that directory, e.g.

mkdir ~/teleport/ && cd ~/teleport/

Download the latest teleport.phar distribution of Teleport into your Teleport working directory.

Create a Profile of a MODX site:

php teleport.phar --action=Profile --name="MyMODXSite" --code=mymodxsite --core_path=/path/to/mysite/modx/core/ --config_key=config

Extract a Snapshot from the MODX site you just profiled:

php teleport.phar --action=Extract --profile=profile/mymodxsite.profile.json --tpl=phar://teleport.phar/tpl/develop.tpl.json

Other Installation Methods

Alternatively, you can install Teleport using the source and Composer. Learn more about using git clone or a release archive.

IMPORTANT: If you want to use the Teleport HTTP Server you cannot use the Phar distribution. You MUST use one of the other installation methods.

Teleport in your PATH

With any of the installation methods you can create an executable symlink called teleport pointing to bin/teleport, or directly to the teleport.phar. You can then simply type teleport instead of bin/teleport or php teleport.phar to execute the teleport application.

Basic Usage

In all of the usage examples that follow, call teleport based on how you have installed the application. For example, if you installed from source, substitute bin/teleport for php teleport.phar; if you have created an executable symlink to the teleport.phar, substitute teleport for php teleport.phar in the sample commands. The following examples assume you have installed the teleport.phar distribution.

NOTE: Before using Teleport with a MODX site, you will need to create a Teleport Profile from the installed site.

Create a MODX Site Profile

You can create a Teleport Profile of an existing MODX site using the following command:

php teleport.phar --action=Profile --name="MySite" --code=mysite --core_path=/path/to/mysite/modx/core/ --config_key=config

The resulting file would be located at profile/mysite.profile.json and could then be used for Extract or Inject commands to be run against the site represented in the profile.

Learn more about Teleport Profiles.

Extract a Snapshot of a MODX Site

You can Extract a Teleport snapshot from a MODX site using the following command:

php teleport.phar --action=Extract --profile=profile/mysite.profile.json --tpl=phar://teleport.phar/tpl/develop.tpl.json

The snapshot will be located in the workspace/ directory if it is created successfully.

You can also Extract a Teleport snapshot and push it to any valid stream target using the following command:

php teleport.phar --action=Extract --profile=profile/mysite.profile.json --tpl=phar://teleport.phar/tpl/develop.tpl.json --target=s3://mybucket/snapshots/ --push

In either case, the absolute path to the snapshot is returned by the process as the final output. You can use this as the path for an Inject source.

NOTE: The workspace copy is removed after it is pushed unless you pass --preserveWorkspace to the CLI command.

Learn more about the Teleport Extract Action.

Inject a Snapshot into a MODX Site

You can Inject a Teleport snapshot from any valid stream source into a MODX site using the following command:

php teleport.phar --action=Inject --profile=profile/mysite.profile.json --source=workspace/mysite_develop-120315.1106.30-2.2.1-dev.transport.zip

NOTE: If the source is not within the workspace/ directory a copy will be pulled to that location and then removed after the Inject completes unless --preserveWorkspace is passed.

Learn more about the Teleport Inject Action.

UserCreate

You can create a user in a profiled MODX site using the following command:

php teleport.phar --action=UserCreate --profile=profile/mysite.profile.json --username=superuser --password=password --sudo --active --fullname="Test User" [email protected]

NOTE: This uses the security/user/create processor from the site in the specified profile to create a user, and the action accepts any properties the processor does.

Learn more about the Teleport UserCreate Action.

Get Started

Learn more about Teleport in the documentation.

License

Teleport is Copyright (c) MODX, LLC

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

teleport's People

Contributors

hansek avatar matdave avatar netprophet avatar omeryl avatar opengeek avatar theboxer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teleport's Issues

Core Promote tpl

Create a tpl + resolver based on the promote tpl that excludes data from extras tables but updates their schema.

E.g. allow a FormIt update to correct the table if a new field is added, but not overwrite the current data.

Obscure error from Extract

When running extract, regardless of environment, this is the result for a few sites:

[2015-07-15 19:30:11] (ERROR @ teleport.phar) Could not load class: modAccessNamespace from mysql.modaccessnamespace.
[2015-07-15 19:30:11] (ERROR @ teleport.phar) Could not load class: modAccessNamespace from mysql.modaccessnamespace.

Fatal error: Call to a member function prepare() on null in /Applications/MAMP/htdocs/basic.modx/core/xpdo/xpdo.class.php on line 2921

No other useful information as far as I can tell.

Wrong query while extract

After use of command (with my created profile of course)

php teleport.phar --action=Extract --profile=profile/mymodxsite.profile.json --tpl=phar://teleport.phar/tpl/develop.tpl.json

I got this error

(ERROR) Error 42000 executing query: SELECT `modFormCustomizationSet`.`id` AS `modFormCustomizationSet_id`, `modFormCustomizationSet`.`profile` AS `modFormCustomizationSet_profile`, `modFormCustomizationSet`.`action` AS `modFormCustomizationSet_action`, `modFormCustomizationSet`.`description` AS `modFormCustomizationSet_description`, `modFormCustomizationSet`.`active` AS `modFormCustomizationSet_active`, `modFormCustomizationSet`.`template` AS `modFormCustomizationSet_template`, `modFormCustomizationSet`.`constraint` AS `modFormCustomizationSet_constraint`, `modFormCustomizationSet`.`constraint_field` AS `modFormCustomizationSet_constraint_field`, `modFormCustomizationSet`.`constraint_class` AS `modFormCustomizationSet_constraint_class`, `Action`.`id` AS `Action_id`, `Action`.`namespace` AS `Action_namespace`, `Action`.`controller` AS `Action_controller`, `Action`.`haslayout` AS `Action_haslayout`, `Action`.`lang_topics` AS `Action_lang_topics`, `Action`.`assets` AS `Action_assets`, `Action`.`help_url` AS `Action_help_url`, `Template`.`id` AS `Template_id`, `Template`.`source` AS `Template_source`, `Template`.`property_preprocess` AS `Template_property_preprocess`, `Template`.`templatename` AS `Template_templatename`, `Template`.`description` AS `Template_description`, `Template`.`editor_type` AS `Template_editor_type`, `Template`.`category` AS `Template_category`, `Template`.`icon` AS `Template_icon`, `Template`.`template_type` AS `Template_template_type`, `Template`.`content` AS `Template_content`, `Template`.`locked` AS `Template_locked`, `Template`.`properties` AS `Template_properties`, `Template`.`static` AS `Template_static`, `Template`.`static_file` AS `Template_static_file`, `Rules`.`id` AS `Rules_id`, `Rules`.`set` AS `Rules_set`, `Rules`.`action` AS `Rules_action`, `Rules`.`name` AS `Rules_name`, `Rules`.`description` AS `Rules_description`, `Rules`.`xtype` AS `Rules_xtype`, `Rules`.`container` AS `Rules_container`, `Rules`.`rule` AS `Rules_rule`, `Rules`.`value` AS `Rules_value`, `Rules`.`constraint` AS `Rules_constraint`, `Rules`.`constraint_field` AS `Rules_constraint_field`, `Rules`.`constraint_class` AS `Rules_constraint_class`, `Rules`.`active` AS `Rules_active`, `Rules`.`for_parent` AS `Rules_for_parent`, `Rules`.`rank` AS `Rules_rank`, `Action`.`id` AS `Action_id`, `Action`.`namespace` AS `Action_namespace`, `Action`.`controller` AS `Action_controller`, `Action`.`haslayout` AS `Action_haslayout`, `Action`.`lang_topics` AS `Action_lang_topics`, `Action`.`assets` AS `Action_assets`, `Action`.`help_url` AS `Action_help_url` FROM `modx_fc_sets` AS `modFormCustomizationSet` LEFT JOIN `modx_actions` `Action` ON `modFormCustomizationSet`.`action` = `Action`.`id` LEFT JOIN `modx_site_templates` `Template` ON `modFormCustomizationSet`.`template` = `Template`.`id` LEFT JOIN `modx_actiondom` `Rules` ON `modFormCustomizationSet`.`id` = `Rules`.`set` LEFT JOIN `modx_actions` `Action` ON `Rules`.`action` = `Action`.`id` WHERE `modFormCustomizationSet`.`profile` = ? ORDER BY `modFormCustomizationSet`.`id` ASC  - Array
(
    [0] => 42000
    [1] => 1066
    [2] => Not unique table/alias: 'Action'
)

The package is seemed to be created though: "Successfully extracted" message is shown.

MODX 2.2.10-sdk
PHP 5.4.23

Not working with modified modx directory names

I'm running modx 2.2.13, with hardened folder names, so folders such as connectors, manager, core, assets, are all named something else.

I've created a site profile, however am encountering LOTS of errors during extract.

The extract ends with the following:
Error handling Extract Teleport request: Error Extracting snapshot: Error packing sandbox_complete-140808.1252.21-2.2.13-pl.transport.zip

I tried using teleport on a clean install of modx 2.2.13, and I got a few errors such as the following:
(ERROR @ teleport.phar) Could not create target directory /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle
and
(ERROR @ teleport.phar) Could not copy directory /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle to /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle [2014-08-08 19:01:27] (ERROR @ teleport.phar) Could not copy directory /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl to /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl [2014-08-08 19:01:27] (ERROR @ teleport.phar) Could not copy directory /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace to /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl/xPDOFileVehicle/b457bd217f29a9c9cbfc535ac136899b/teleport/workspace [2014-08-08 19:01:25] Created new transport package with signature: modx_2_2_13_complete-140808.1901.25-2.2.13-pl

However, it does appear to have completed successfully:
Successfully extracted modx_2_2_13_complete-140808.1901.25-2.2.13-pl.transport.zip from instance modx_2_2_13 /Users/ahaller/Sites/git/modx-2.2.13-pl/teleport/workspace/modx_2_2_13_complete-140808.1901.25-2.2.13-pl.transport.zip

My teleport directory is at the root of my modx install.
I have given the telport directory full 777 permissions.
I am using MAMP with PHP 5.5.3.

Questions

Are these bugs/incompatibilities with the version of ModX I am running?
Is teleport unable to work on a site with "hardened" (modified) directory names?
What do the errors on the clean install indicate?

Syntax Error on MediaTemple Grid Server?

I know these aren't the best steps to reproduce but FWIW when trying to create a profile with:

php teleport.phar --action=Profile --name="mysite" --code=mysite --core_path=/mysite/html/core/ --config_key=config

I get this syntax error on a Media Temple GridServer

Parse error: syntax error, unexpected '[', expecting ')' in phar:///nfs/c02/h04/mnt/22945/data/teleport/teleport.phar/vendor/react/promise/src/functions.php on line 68
dalefournier.com@cl04:/nfs/c02/h04/mnt/22945/data/teleport$ 

If there's any other info I can provide that may be helpful lmk

Logging Actions

On a successful extraction action add an entry to Manager Log. Or someplace to track them

$modx->logManagerAction($eventName,'modUser',$user->get('id'));

Add Configurable Workspace and Output Paths

In general, the paths for Teleport work exactly as needed. There are certain circumstances, through no fault of Teleport, that can cause complication, however. One such circumstance is when the workspace directory is among the paths being included in the tpl. In this case, it can cause an infinite chain of links/directories. While this is a special circumstance, now that Teleport can be used for Extras, it raises the question of whether alternate workspace and output directories should be considered.

Of course, --push --target=path/to/dir/ is an option, but this only resolves upon completion, and does not affect the workspace directory. Further, the workspace only gets cleaned after the package has been written. While the average circumstance requires no such option, adding the option will allow immediate circumvention of issues similar to the one above. Additionally, it would add value to other tools that might depend upon Teleport as a library/class resource rather than simply a CLI tool.

Update docs

You might want to add something about the "teleport.phar --version" command.

Injecting teleport source leads to no packages installed

I'm trying to use Teleport to move a site from one server to another, and overall, it seems to work really well. Injecting a profile into an empty site appears to result in a fully functional site (on the frontend).

However, there are no packages screenshot and at least some plugins don't seem to be firing properly. (I'll try to get better info on the issue in the near future, but I'm in a bit of a time crunch ATM).

Am I misunderstanding what should be happening / how Teleport is intended to be used, or is this a bug?

Error

Got this error message performing action=Profile

PHP Fatal error: Declaration of Teleport\Request\Request::getResults() must be compatible with that of Teleport\Request\RequestInterface::getResults() in phar:///data/www2/public/teleport/teleport.phar/src/Teleport/Request/Request.php on line 24

phpinfo() in IM

phar errors

I'm getting these errors when trying to create a profile. It's a fresh install of the teleport.phar and the same environment that I've run teleport on before without any issues

-sh-4.1$ php teleport.phar --action=Profile --name="XXXXX" --code=XXXXX --core_path=/var/www/vhosts/XXXXXdevelopment.com/httpdocs/core/ --config_key=config
PHP Warning:  require(phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_psr4.php): failed to open stream: phar error: "vendor/composer/autoload_psr4.php" is not a file in phar "/var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar" in phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_real.php on line 31

Warning: require(phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_psr4.php): failed to open stream: phar error: "vendor/composer/autoload_psr4.php" is not a file in phar "/var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar" in phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_real.php on line 31
PHP Fatal error:  require(): Failed opening required 'phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_psr4.php' (include_path='.:') in phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_real.php on line 31

Fatal error: require(): Failed opening required 'phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_psr4.php' (include_path='.:') in phar:///var/www/vhosts/XXXXXdevelopment.com/httpdocs/teleport/teleport.phar/vendor/composer/autoload_real.php on line 31

[develop.tpl] Not unique table/alias: 'Action'

I get this error in modFormCustomizationSet using develop.tpl during an extract.

SQL code:

SELECT modFormCustomizationSet.id AS modFormCustomizationSet_id, modFormCustomizationSet.profile AS modFormCustomizationSet_profile, modFormCustomizationSet.action AS modFormCustomizationSet_action, modFormCustomizationSet.description AS modFormCustomizationSet_description, modFormCustomizationSet.active AS modFormCustomizationSet_active, modFormCustomizationSet.template AS modFormCustomizationSet_template, modFormCustomizationSet.constraint AS modFormCustomizationSet_constraint, modFormCustomizationSet.constraint_field AS modFormCustomizationSet_constraint_field, modFormCustomizationSet.constraint_class AS modFormCustomizationSet_constraint_class, Action.id AS Action_id, Action.namespace AS Action_namespace, Action.controller AS Action_controller, Action.haslayout AS Action_haslayout, Action.lang_topics AS Action_lang_topics, Action.assets AS Action_assets, Action.help_url AS Action_help_url, Template.id AS Template_id, Template.source AS Template_source, Template.property_preprocess AS Template_property_preprocess, Template.templatename AS Template_templatename, Template.description AS Template_description, Template.editor_type AS Template_editor_type, Template.category AS Template_category, Template.icon AS Template_icon, Template.template_type AS Template_template_type, Template.content AS Template_content, Template.locked AS Template_locked, Template.properties AS Template_properties, Template.static AS Template_static, Template.static_file AS Template_static_file, Rules.id AS Rules_id, Rules.set AS Rules_set, Rules.action AS Rules_action, Rules.name AS Rules_name, Rules.description AS Rules_description, Rules.xtype AS Rules_xtype, Rules.container AS Rules_container, Rules.rule AS Rules_rule, Rules.value AS Rules_value, Rules.constraint AS Rules_constraint, Rules.constraint_field AS Rules_constraint_field, Rules.constraint_class AS Rules_constraint_class, Rules.active AS Rules_active, Rules.for_parent AS Rules_for_parent, Rules.rank AS Rules_rank, Action.id AS Action_id, Action.namespace AS Action_namespace, Action.controller AS Action_controller, Action.haslayout AS Action_haslayout, Action.lang_topics AS Action_lang_topics, Action.assets AS Action_assets, Action.help_url AS Action_help_url FROM modx_fc_sets AS modFormCustomizationSet LEFT JOIN modx_actions Action ON modFormCustomizationSet.action = Action.id LEFT JOIN modx_site_templates Template ON modFormCustomizationSet.template = Template.id LEFT JOIN modx_actiondom Rules ON modFormCustomizationSet.id = Rules.set LEFT JOIN modx_actions Action ON Rules.action = Action.id WHERE modFormCustomizationSet.profile = ? ORDER BY modFormCustomizationSet.id ASC

Documentation update: PHP Version

Readme should be updated to reflect that Teleport requires PHP 5.4.0+ and not 5.3.3+ as currently stated. This is due to the dependencies requiring PHP 5.4+.

Example output from composer install on a box running PHP 5.3.29:

 Problem 1
    - Installation request for evenement/evenement v2.0.0 -> satisfiable by evenement/evenement[v2.0.0].
    - evenement/evenement v2.0.0 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 2
    - Installation request for react/cache v0.4.0 -> satisfiable by react/cache[v0.4.0].
    - react/cache v0.4.0 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 3
    - Installation request for react/child-process v0.4.0 -> satisfiable by react/child-process[v0.4.0].
    - react/child-process v0.4.0 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 4
    - Installation request for react/dns v0.4.1 -> satisfiable by react/dns[v0.4.1].
    - react/dns v0.4.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 5
    - Installation request for react/event-loop v0.4.1 -> satisfiable by react/event-loop[v0.4.1].
    - react/event-loop v0.4.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 6
    - Installation request for react/http v0.4.0 -> satisfiable by react/http[v0.4.0].
    - react/http v0.4.0 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 7
    - Installation request for react/http-client v0.4.1 -> satisfiable by react/http-client[v0.4.1].
    - react/http-client v0.4.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 8
    - Installation request for react/promise v2.2.0 -> satisfiable by react/promise[v2.2.0].
    - react/promise v2.2.0 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 9
    - Installation request for react/react v0.4.2 -> satisfiable by react/react[v0.4.2].
    - react/react v0.4.2 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 10
    - Installation request for react/socket v0.4.2 -> satisfiable by react/socket[v0.4.2].
    - react/socket v0.4.2 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 11
    - Installation request for react/socket-client v0.4.2 -> satisfiable by react/socket-client[v0.4.2].
    - react/socket-client v0.4.2 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 12
    - Installation request for react/stream v0.4.2 -> satisfiable by react/stream[v0.4.2].
    - react/stream v0.4.2 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.

Excluding directories

Something like this? Is basepathassets the same as webroot?

    {
        "vehicle_class": "xPDOFileVehicle",
        "object": {
            "script": "extract\/basepathassets.php",
            "excludes": [
                "email",
                "image-cache",
                "videos",
                "themes/sources",
                "themes/bootstrap_src"
            ]
        }

Resources Extract/Inject (possible bug)

I've extracted my site using resources.tpl.json file. When I attempt injection on a separate install, I get the following error:
(ERROR @ bin/teleport) Instantiated a derived class modDocument that is not a subclass of the requested class modSymLink
It then hangs for a minute, and PHP runs out of memory:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 78 bytes) in /Users/ahaller/Sites/git/fw_modx/fw_core_ks2ge/model/modx/modresource.class.php on line 882

Do you know how I can resolve this issue?

resources template does not work recursive

The resources.tpl.json does not work work recursive. It misses a rule for setting the parent. At the moment the parent is not changed during extract/inject, which makes that template unusable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.