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

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.3
    • Fix Version/s: None
    • Component/s: blade-cli, blade-samples
    • Labels:
      None

      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/frontend-js-metal-web$metal-soy-bundle@2.16.8/lib/bundle.js?languageId=en_US:3395:28)↵    at Object.goog.asserts.fail (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-soy-bundle@2.16.8/lib/bundle.js?languageId=en_US:3502:40)↵    at Object.soy.asserts.assertType (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-soy-bundle@2.16.8/lib/bundle.js?languageId=en_US:4754:28)↵    at $render (http://localhost:8080/o/js/resolved-module/dynamic-data-form-field-rule-error-v73-form-field@1.0.0/form-field-rule-error-v73.soy.js?languageId=en_US:143:29)↵    at Soy.renderIncDom (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-soy@2.16.8/lib/Soy.js?languageId=en_US:262:7)↵    at render (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.8/lib/render/render.js?languageId=en_US:483:28)↵    at Soy.renderInsidePatch (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.8/lib/IncrementalDomRenderer.js?languageId=en_US:263:26)↵    at renderSubComponent_ (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.8/lib/render/render.js?languageId=en_US:596:24)↵    at renderFromTag_ (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.8/lib/render/render.js?languageId=en_US:505:16)↵    at MetalFieldAdapter.handleChildrenCaptured_ (http://localhost:8080/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.8/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:
            Unassigned
            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