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

Unable to use any scripting language besides Groovy



      NOTE: This fix is only reproducible on a DXP bundle, building from source will NOT reproduce the error. Although this is only reproducible on a DXP bundle, the fix should also be committed to master since the file structure would differ if not included.

      When going through a workflow with custom Javascript code, the asset will remain in 'pending' state, even if it should be approved automatically. This can be seen when using the default source XML when creating a new workflow.

      This issue occurs because Javascript is not recognized as a valid scripting language. This issue should also be reproducible with any scripting language aside from Groovy.

      1) Start DXP
      2) Go to Control Panel > Configuration > Workflow Definition
      3) Add a new definition and upload the attached custom workflow xml. Save.
      4) Go to Liferay Site Control Panel > Configuration > Workflow Configuration.
      5) Edit Blogs to use the new workflow. The new workflow says to check if the user creating content has any other the following roles: Site Content Admin, Site Content Reviewer, Site Administrator, Site Owner
      If the user does have one of the above roles, the workflow tries to automatically approve the content.
      6) Go to Content > Blogs as the omni admin (or as a user with one of the above roles) and create a blogs post.

      Expected: the blog post will be approved.
      Actual: the blog post is not approved.

      Further, viewing the latest entry in the kaleoLog table shows the following message in the comment column

      com.liferay.portal.kernel.scripting.UnsupportedLanguageException: javascript

      After digging deeper, I found the GroovyExecutor class is the only executor class located within modules/apps/foundation. This was moved with LPS-64031.

      The other executor classes are located within modules/apps/portal-scripting-javascript (with javascript being the example). These were moved later with LPS-64744. I believe these all should have been moved at the same time, and to the same location. Since these executors are not within the Foundation folder, they are not being built and added to fix-packs or the vanilla bundle.

      DXP de-13 - Reproduced, only com.liferay.portal.scripting.groovy.jar exists in bundle
      Branch 70x - 1403b918fbe4be0bde83b560e20c9b81b3cfd6c7: Not reproduced, all scripting jars are built and deployed
      Master - 2340bf972ad7381359fdc6df40e388d12c1daa52: Not reproduced, all scripting jars are built and deployed


          Issue Links



              brian.chan Brian Chan
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                4 years, 41 weeks, 1 day ago


                  Version Package