Published Solutions
-
Some configuration titles are not localized in Plesk
Original Publishing Date: 2020-01-22 Symptoms The following WordPress configuration fields are not translated if the user is logged with non-English locale: Administrator's email Site name Interface language Cause User is logged in Plesk Panel with non-English locale which is unsupported by Wordpress application. The required language is not included in APP-META.xml Resolution You have logged in Plesk panel with Ukrainian locale. But this language is not supported by Wordpress application itself. See the part of APP-META.xml file below: Administrator's email Administrator's email E-mail de l'administrateur Benutzername des Administrators Correo electrónico del administrador E-mail administratora E-mail администратора E-mail do administrador Site name Site name Nom du site Website-Name nombre del sitio Nazwa strony Название сайта Nome do site As you can see there is no Ukrainian language in the APP-META.xml file. Configuration fields will have correct translation in case a user is logged with one of the following languages: fr-FR de-DE es-ES pl-PL ru-RU pt-BR Internal content
-
How to hide or display a setting depending on other setting value in APS 1.2?
Original Publishing Date: 2020-01-22 Symptoms In my APS 1.2 application, it is needed to display particular setting group conditionally, depending on a value of another setting. How to hide/display setting or a group of settings conditionally? Resolution To hide/show settings conditionally, use 'show/hide' classes, in the following format: class="show:flag_setting_id=value" - show a setting if flag setting has particular 'value'. class="hide:flag_setting_id=value" - hide a setting if flag setting has particular 'value'. Or, if there are several possible values of flag setting in condition: class="show:flag_setting_id=value1|value2|value3" If flag setting has 'enum' type, changing of its value affects depending settings visibility right away. If there is verification script in application service, it will be called before settings visibility is updated in UI. Examples. Show firstName setting is 'type' setting has value '1': First Name Hide status setting if type is 1 or 3: Operation Status Show a group of settings if status setting has value 'failed' or 'error': Troubleshot Error Message Contact Support Internal content
-
I get an error ' The entity name must immediately follow the '&' in the entity reference' when trying to build a package.
Original Publishing Date: 2020-01-22 Symptoms When trying to build a package an error is returned: XML structure is broken. The entity name must immediately follow the '&' in the entity reference. Cause '&' is a predefined entity in XML and should be properly escaped. Resolution '&' (ampersand) should be substituted with '&', read more on XML syntax. Internal content
-
[Examples] Asynchronous provisioning sample package
Original Publishing Date: 2020-01-22 Asynchronous provisioning This is a basic package that can provision resources asynchronously, more information on the topic is available on the resource provisioning page in documentation. The package implements only two resources, globals and provisionable. Both resources are owned by provider: provisionable is a dummy resource which does not do anything except provision itself asynchronously. Actual code responsible for asynchonous provisioning is very short and straightforward: public function provision() { // Throw exception to return code *202 Accepted* to APS controller and start asynchronous phase throw new \Rest\Accepted($this, "Provisioning the resource", 30); // tell controller to check back in 30 seconds } public function provisionAsync() { if (rand(0,1)) // flip a coin -- it it's heads, let's say that provisioning is not completed throw new \Rest\Accepted($this, "Still provisioning", 30); // if it's tails, return success -- the resource is provisioned. } After deploying the package you can open the instance in provider's panel and click a button to provision a new provisionable, if you go to task manager you will see a task named Provisioning "provisionable" for APS application async-provisioning. If you click on a task, you will see in task output a message being returned from the provisionAsync function, and in task description -- message initially returned from provision() function. The package can be downloaded here. Manual Deployment instructions Deploy the endpoint, standard endpoint.sh script can be used for deployment: [root@endpoint ~]# endpoint.sh async-prov async_provisioning-0.1-1.app.zip ... CONGRATULATIONS! Endpoint configured SUCCESSFULLY http endpoint url: http://endpoint.a.developer.apsdemo.org/async-prov https endpoint url: https://endpoint.a.developer.apsdemo.org/async-prov Import the package into POA. Create an application instance, supply the URL for endpoint created earlier. There is no need to create any resource types or subscriptions, you can open the application instance and experiment with it. Internal content
-
[how-to] [Linux] Installing apstools
Original Publishing Date: 2020-01-22 Resolution apstools requires java, php and APS PHP Runtime. JRE/JDK and PHP are usually already installed on most Linux distributives. Verify that both Java and PHP are available, execute the following commands in Terminal: java -version php -v Verify that php-xml is installed: php -r "phpinfo();" | grep libxml Download and install APS PHP Runtime Note: if you install APS PHP Runtime using rpm you do not need to modify include_path in php.ini, otherwise you need to ensure that APS PHP Runtime is in include_path Install apstools Internal content
-
[how-to] [OS X] Installing apstools
Original Publishing Date: 2020-01-22 Resolution apstools requires java, php and APS PHP Runtime. JRE/JDK and PHP are usually already installed on most OS X distributives. Verify that both Java and PHP are available, execute the following commands in Terminal: java -version php -v Download APS PHP Runtime Note: make sure APS PHP Runtime is accessible for PHP using include_path in php.ini: rename /etc/php.ini.default to /etc/php.ini uncomment include_path for Unix in php.ini specify the path to the folder where you unpacked APS PHP Runtime Install apstools Internal content
-
Removing placeholders from Navigation Tree
Original Publishing Date: 2020-01-22 Symptoms Is it possible to remove placeholders from the Navigation Tree? You can see 4 reports link in navigation tree. I want to delete 3 of 4 reports link. Is it possible.? I have attached snap for better understanding. Cause Resolution The only possible way is to remove the application, rebuild the new package within a new APP-META.xml and import the application again. Internal content
-
customizing the logo or icon of Placeholders for Navigation Tree
Original Publishing Date: 2020-01-22 Symptoms Is it possible to customize the logo or icon of Placeholders for Navigation Tree? Resolution Unfortunately it is not possible to make custom icon in navigation tree. According to Relax NG schema the icon can be specified in the description of , , and tags. The feature request ID is APS-18014 Internal content
-
Fatal error on APS 1.2 application screen after VERIFICATION script was added
Original Publishing Date: 2020-01-22 Symptoms I added verification script to application. After that, when trying to install application in CCP, I get FATAL ERROR. Cause In most cases, such problem happens because script prints some raw output to STDOUT, while structured-output flag is set in the script declaration in APP-META.xml Resolution As soon as structured-output is declared, script must print all debug messages to STDERR. Only valid structured output (xml) should be printed to STDOUT. Structured output format is described here If, in some cases, you still want to display raw output to user, make script exist with not zero status, and print your raw message to STDERR. Internal content
-
Creating an object of specific type to use with registerResource
Original Publishing Date: 2020-01-22 Symptoms I need to create an object of a specific APS type so I can later use this object with registerResource and create a new resource of this type. Resolution You should use the newResourceByTypeId method: $resource = \APS\TypeLibrary::newResourceByTypeId("http://parallels.com/aps/types/pa/dns/record/a/1.0"); $resource->property1 = "value1"; $resource->property2 = "value2"; $apsc->registerResource($resource); You could use POA internal types as well as your own types or types of other applications registered in POA with newResourceByTypeId. Internal content