Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-255

Parameter "result_to_var" doesn't work for m_Param tag

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.2
    • Component/s: Template System
    • Labels:
      None
    • Additional information:
      Hide

      Problem is hidden in "result_to_var" parameter implementation code. There are two places, where this parameter is processed:

      • compiled template code
      • PostProcess method of TagProcessor class

      1. for non-pair tags this parameter is processed in both places
      2. for pair tags this parameter is processed on in 2nd place (PostProcess method).

      PostProcess method set's tag result to parser parameter on current deep level. That raises a problem, when deep level is changed after that. For example: all pair tags change deep level and they automatically loose parameter value, when deep level is restored.

      I propose, that we should move all "result_to_var" parameter processing into compiled template code to avoid such problem in future.

      =====================

      In case if we comment-out "result_to_var" processing in PostProcess method, then there is fatal error about missing "_TagProcessor" in all grids in administrative console.

      Show
      Problem is hidden in "result_to_var" parameter implementation code. There are two places, where this parameter is processed: compiled template code PostProcess method of TagProcessor class 1. for non-pair tags this parameter is processed in both places 2. for pair tags this parameter is processed on in 2nd place (PostProcess method). PostProcess method set's tag result to parser parameter on current deep level. That raises a problem, when deep level is changed after that. For example: all pair tags change deep level and they automatically loose parameter value, when deep level is restored. I propose, that we should move all "result_to_var" parameter processing into compiled template code to avoid such problem in future. ===================== In case if we comment-out "result_to_var" processing in PostProcess method, then there is fatal error about missing "_TagProcessor" in all grids in administrative console.
    • External issue ID:
      306
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      Parameter "result_to_var" allows to store tag result into parser parameter name, that is specified. It doesn't work for this code:

      <inp2:m_Capture to_var="test">
      data
      </inp2:m_Capture>

      <inp2:m_Param name="test" result_to_var="other"/>

      Parameter "other" will be empty, but should contain "data" as it's value.

        Attachments

          Activity

            People

            • Assignee:
              alex Alex
              Reporter:
              alex Alex
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: