Published Solutions
-
Error message 'impossible not to provision non-optional resource' when creating a subscription.
Original Publishing Date: 2020-01-22 Symptoms I'm trying to create a subscription to test my APS package but an error is shown at the end of subscription creation wizard: void Plesk::APS::ApplicationServiceInstanceProvider::provideServiceInstance(const Plesk::APS::ProvisioningPossibility&) : [APSC] impossible not to provision non-optional resource Cause POA tries to create a resource with 'autoprovision' flags and checks its relations to other services, one of the services with 'required: true' relation is not present in subscription Resolution Check resource schema for autoprovided resource, since it is main resource of application it should have 'required: true' relation only to POA core resources such as core/account, core/subscription etc. Internal content
-
Error message "TypeError: invalid 'in' operand context" when trying to create aps/Grid
Original Publishing Date: 2020-01-22 Symptoms I'm trying to display data in aps/Grid, to do this I call custom operation and feed it into aps/Memory but there is an error: TypeError: invalid 'in' operand context context = (p in context ? context[p] : (create ? context[p] = {} : undefined)); Cause aps.js library expects data property for aps/Memory to be an array of objects, it attempts to iterate over it to extract the data: getProp = function(/*Array*/parts, /*Boolean*/create, /*Object*/context){ var p, i = 0, dojoGlobal = dojo.global; if(!context){ if(!parts.length){ return dojoGlobal; }else{ p = parts[i++]; try{ context = dojo.scopeMap[p] && dojo.scopeMap[p][1]; }catch(e){} context = context || (p in dojoGlobal ? dojoGlobal[p] : (create ? dojoGlobal[p] = {} : undefined)); } } while(context && (p = parts[i++])){ context = (p in context ? context[p] : (create ? context[p] = {} : undefined)); } Most probably data is a string. Resolution Verify that result of querying the store are in proper JSON format. Internal content Link on internal Article
-
How to know what object is being linked or unlinked to/from your resource in PHP runtime
Original Publishing Date: 2020-01-22 Problem For Link() and Unlink() methods in my application resource I would like to know the resource that is being linked or unlinked. Solution You can get a link object (APS\ResourceProxy) as an argument to your link and unlink methods. Suppose I have a resource with a relation to an array of DNS records called arecords. This function will write to log the ID of the DNS record that is being unlinked: public function arecordsUnlink($record) { APS\Logger::get()->debug("Record unlinked: " . print_r($record->aps->id, true)); } Result in /var/log/httpd/error_log will look like this: [2014-07-03 06:04:52.554716 UTC] DEBUG Record unlinked: dbc28c5f-9605-4c0c-b5ef-3e48ba1ff1f0 Internal content
-
Icon classes
Original Publishing Date: 2020-01-22 Problem Examples in APS UI specification often suggest to use some built-in icon classes for buttons (for example here in aps/Toolbar documentation), where can I find the list of available icons? Resolution You can find the css on management node (main server in your sandbox infrastructure): /usr/local/pem/ui/webgate/static/skins/v3/css/main-buttons.css Internal content
-
[how-to] Creating links on Home screen in CCP
Original Publishing Date: 2020-01-22 Problem Since POA 5.5.4 APS2 applications are showed on Home tab in CCP, is it possible to use it as shortcuts to some operations as it was possible in APS1? Resolution You need to specify an entry-point in a service declaration. This example shows how to navigate to a particular view in custom UI of an application: Environment Environment service Env Entry Point (#ip-addresses) There is an example in sample UI package. Internal content
-
How to disable caching when developing custom UI views
Original Publishing Date: 2020-01-22 Symptoms I'm changing UI files on my sandbox main server (management node) but I do not see recent changes. Cause Content is cached, either server-side or browser-side Resolution 1) Make sure system property 'APS development mode' is enabled in System > Settings > System Properties 2) Disable caching in browser you use for development or use force refresh. To disable cache in Firefox: open 'about:config' set to 'false' the caching switches: 'browser.cache.disk.enable', 'browser.cache.memory.enable', 'browser.cache.offline.enable'. To disable cache in Chrome: Open Development Tools click on settings wheel in upper right corner of devtools to open its settings check Disable cache (while DevTools is Open) Internal content
-
How to find the parameters sent to application endpoint
Original Publishing Date: 2020-01-22 Symptoms I need to find the parameters that are sent to application endpoint, is there an easy way to do it? Resolution Note: APS Development Mode should be enabled in POA Tail poa.debug.log when executing needed action Find POST / PUT request to endpoint for your application, it should look like this: Dec 23 12:43:55 mn : DBG [SYSTEM 1:1777:af95cb70 SAAS]: [txn:280405 APSC] curl -D- -X POST -H 'APS-Controller-URI: https://10.28.7.128:6308/' -H 'APS-Identity-ID: 9d5e6af0-0d10-4897-8532-310439e3e7bf' -H 'APS-Instance-ID: 88f7987b-8155-4ec5-ae2c-c98475272705' -H 'APS-Transaction-ID: fb4ca8c3-943d-4aa1-ab32-278ea0b80163' -H 'Accept: text/html' -H 'Host: endpoint.sandbox.apsdemo.org' -d @/tmp/99b01199-baa5-497b-a9ca-83d5332b4085.20131223T124355.716090 http://sandbox.apsdemo.orgu/OwnCloud-ldap/users Check this file in /tmp folder: [root@mn ~]# cat /tmp/99b01199-baa5-497b-a9ca-83d5332b4085.20131223T124355.716090 { "aps": { "type": "http://owncloud.org/users/1.0", "id": "99b01199-baa5-497b-a9ca-83d5332b4085", "status": "aps:provisioning", "revision": 2, "modified": "2013-12-23T08:43:54Z", "package": { "id": "8e21ffe5-2a1a-48a2-aa06-3e13fa51cefd", "href": "/aps/2/packages/8e21ffe5-2a1a-48a2-aa06-3e13fa51cefd" } }, "quota": 10, "userstatus": "Ready", "samples": { "aps": { "link": "strong", "href": "/aps/2/resources/7f040d0d-8521-4718-83e9-015ad70066c7", "id": "7f040d0d-8521-4718-83e9-015ad70066c7" } }, "tenant": { "aps": { "link": "strong", "href": "/aps/2/resources/1386cc53-8a5d-45ec-9cfc-4de6b23dfc82", "id": "1386cc53-8a5d-45ec-9cfc-4de6b23dfc82" } }, "user": { "aps": { "link": "strong", "href": "/aps/2/resources/2e3e6066-8984-4021-aae6-9fc438e2f30b", "id": "2e3e6066-8984-4021-aae6-9fc438e2f30b" } } } Internal content
-
How to troubleshoot schema-related errors
Original Publishing Date: 2020-01-22 Symptoms I receive error "Can't find schema for 'http://www.vendor.com/application/5.0'." or other errors messages regarding schema after importing new application with changed type versions. Cause Most probably type version was not changed everywhere: 1) APP-META.xml: ` in navigation 2) schema files in package 3) in ui/ files (apsType for aps/ResourceStore) 4) in case you use aps-php-runtime: php scripts on endpoint 5) in case you use aps-php-runtime: typeCache folder caches old schemas, it should be deleted if schema in scripts is changed. Internal content
-
Cannot switch to Billing in sandbox
Original Publishing Date: 2020-01-22 Symptoms I cannot switch to Billing in my sandbox, one of the following is happening when I click the 'Billing' button in Provider's panel: Page is being loaded for a long time An error about untrusted connection is shown A blank page is shown Cause Self-signed certificate is installed in Business Automation. Most browsers cannot handle accepting untrusted certificates in a frame Resolution Open https://pba.YOUR_SANDBOX_NAME.apsdemo.org/ in browser. If you have newer configuration (lin-billing-new) open https://pba.YOUR_SANDBOX_NAME.apsdemo.org:8443/ (notice the non-standard port number). Accept the self-signed certificate A login screen appears. Do not enter any credentials into it Open http://YOUR_SANDBOX_NAME.apsdemo.org:8080 in browser (Operations Automation control panel) and log in. Billing button should now be working. For example, if your sandbox is a.developer.apsdemo.org you should open https://pba.a.developer.apsdemo.org and accept the certificate. Make sure you use https and not http, and specify port 8443 if you have a lin-billing-new sandbox. Then log in to http://a.developer.apsdemo.org, log in and try the Billing button. Internal content
-
Limitations of APS settings branding
Original Publishing Date: 2020-01-22 Symptoms Settings values from the brand are not applied to instance and/or are not passed to verification script when it's called. Instead, settings from resource type are used. Cause There are the following limitations to aps branding in POA: Branding does not work for global settings, except for entry point branding*. Branded settings are not applied on verification stage. Settings with 'login' and 'password' classes, or 'password' type, are not branded. Avoid words 'login' and 'password' in branded setting IDs. They have the same effect as 'login' and 'password' classes. note: entry point is branded by setting with class="access_point", example application - Open-Xchange. Resolution Move branded settings from global to top service, with 'hidden' attribute assigned. Don't expect branded values to be passed to verification script. Rely on default values from resource type. For branded settings, don't use 'login' and 'password' classes, 'password' type, 'login' and 'password' in setting ID. Example application: BackupAgent Internal content Link on internal Article