Uploaded image for project: 'PUBLIC - Liferay BLADE'
  1. PUBLIC - Liferay BLADE
  2. BLADE-626

Cannot add rule for form field create with Blade due to non-optional parameters in template

    Details

      Description

      Reproducing Steps

      1. Install Blade 4 if not install yet.
      2. Create a new form field with command blade create -t form-field -v 7.3 form-field-rule-error-v73
      3. Compile and deploy to Liferay 7.3 or 7.3.x (see note below)
      4. Add a new form that includes the deployed form field.
      5. Go to rules and add a new one involving the field, selecting the option Value for the third field.
        Expected: The rule is created correctly
        Observed: There's an error on screen saying 'There was an error when loading the "formFieldRuleErrorV73" field.'
        The browser console also shows some errors:
        goog.asserts.AssertionError
        message: "Failure: expected param tip of type !goog.soy.data.SanitizedContent|string, but got undefined."
        messagePattern: "Failure: expected param tip of type !goog.soy.data.SanitizedContent|string, but got undefined."
        reportErrorToServer: true
        stack: "AssertionError: Failure: expected param tip of type !goog.soy.data.SanitizedContent|string, but got undefined.↵    at new goog.asserts.AssertionError (http://localhost:8080/o/js/resolved-module/[email protected]/lib/bundle.js?languageId=en_US:3395:28)↵    at Object.goog.asserts.fail (http://localhost:8080/o/js/resolved-module/[email protected]/lib/bundle.js?languageId=en_US:3502:40)↵    at Object.soy.asserts.assertType (http://localhost:8080/o/js/resolved-module/[email protected]/lib/bundle.js?languageId=en_US:4754:28)↵    at $render (http://localhost:8080/o/js/resolved-module/[email protected]/form-field-rule-error-v73.soy.js?languageId=en_US:143:29)↵    at Soy.renderIncDom (http://localhost:8080/o/js/resolved-module/[email protected]/lib/Soy.js?languageId=en_US:262:7)↵    at render (http://localhost:8080/o/js/resolved-module/[email protected]/lib/render/render.js?languageId=en_US:483:28)↵    at Soy.renderInsidePatch (http://localhost:8080/o/js/resolved-module/[email protected]/lib/IncrementalDomRenderer.js?languageId=en_US:263:26)↵    at renderSubComponent_ (http://localhost:8080/o/js/resolved-module/[email protected]/lib/render/render.js?languageId=en_US:596:24)↵    at renderFromTag_ (http://localhost:8080/o/js/resolved-module/[email protected]/lib/render/render.js?languageId=en_US:505:16)↵    at MetalFieldAdapter.handleChildrenCaptured_ (http://localhost:8080/o/js/resolved-module/[email protected]/lib/render/render.js?languageId=en_US:252:11)"
        __proto__: goog.debug.Error
        

      The problem seems to come from a few parameters considered mandatory in the Soy template (label, showLabel and tip) which are considered optional by FieldBase.soy.

      Note: Problems may arise in compilation due to versions missing in build.gradle; see BLADE-623.

        Attachments

          Activity

            People

            Assignee:
            seiphon.wang Seiphon Wang
            Reporter:
            ricardo.couso Ricardo Couso
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package
                4.0.11