Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-140302

Create Virtual instance using the Virtual Instance Initializer not works with the curl command.

Description

    Requirement:

    Step-by-Step:

    1. Check if the Liferay DXP is up. (you can login for example)
    2. On the terminal, execute the curl command to create the Virtual Instances with Initializers
    3. curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"domain": "masterclass.com", "portalInstanceId": "masterclass", "siteInitializerKey": "com.liferay.site.initializer.masterclass", "virtualHost": "www.masterclass.com"}' --header 'Content-Type: application/json' --header 'X-Liferay-Transaction-Disabled:true' -u '[email protected]:test'
      
      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"domain": "team-extranet.com", "portalInstanceId": "teamextranet", "siteInitializerKey": "com.liferay.site.initializer.team.extranet", "virtualHost": "www.team-extranet.com"}' --header 'Content-Type: application/json' --header 'X-Liferay-Transaction-Disabled:true' -u '[email protected]:test' 
      
      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"domain": "raylife.com", "portalInstanceId": "raylife", "siteInitializerKey": "com.liferay.site.initializer.raylife", "virtualHost": "www.raylife.com"}' --header 'Content-Type: application/json' --header 'X-Liferay-Transaction-Disabled:true' -u '[email protected]:test'
      
      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"domain": "speedwell.com", "portalInstanceId": "speedwell", "siteInitializerKey": "speedwell-initializer", "virtualHost": "www.speedwell.com"}' --header 'Content-Type: application/json' --header 'X-Liferay-Transaction-Disabled:true' -u '[email protected]:test'
      
      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"domain": "minium.com", "portalInstanceId": "minium", "siteInitializerKey": "minium-initializer", "virtualHost": "minium"}' --header 'Content-Type: application/json' --header 'X-Liferay-Transaction-Disabled:true' -u '[email protected]:test'
      

    Actual result:
    The exception appears on Liferay log, and the user can not create the Virtual instance

    Expected:
    The user can create the Virtual instance.

    Environment:

    • master (Liferay DXP)
    • Localhost
    • MySQL database
    • Commit: 59bcc8518e827673421d4d4944d9706421d06c70 

    Evidence:

    UPDATE: 

    • When testing Raylife, be aware of LPS-144390. If this issue is not solved, then the virtual instance initialization (either through UI or API) will fail.
    • The new header 'X-Liferay-Transaction-Disabled:true' must be included in the request, in order to execute the portal instance creation in the right order. See LPS-141137.
    • Include the new site initializer 'Team extranet' in the tests. See LPS-141961

    Attachments

      Issue Links

        Activity

          People

            catarine.aguiar Catarine Aguiar
            manoel.cyreno Manoel Cyreno
            Kiyoshi Lee Kiyoshi Lee
            Eduardo García Eduardo García (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              46 weeks, 5 days ago

              Packages

                Version Package
                7.4.3.6 CE GA6
                7.4.13 DXP U2
                7.4.3.7 CE GA7
                7.4.13 DXP U3
                Master