Velocity
  1. Velocity
  2. VELOCITY-362

can't load macros in file loaded with #parse

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      I think this is a big bug. I've used velocity in my projects, erveything is ok
      but this. i want to know it's this problem will be resolved in next version? if
      it's not, i have to abandon velocity.
      the bug is :
      from doc:
      This is important to remember if you try to #parse() a template containing
      inline #macro() directives. Because the #parse() happens at runtime, and the
      parser decides if a VM-looking element in the template is a VM at parsetime,
      #parse()-ing a set of VM declarations won't work as expected. To get around
      this, simply use the velocimacro.library facility to have Velocity load your
      VMs at startup.

      1. small.patch
        0.7 kB
        Supun Kamburugamuva
      2. patch.zip
        23 kB
        Supun Kamburugamuva

        Issue Links

          Activity

          whxbb created issue -
          Jeff Turner made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 33750 12315232
          Will Glass-Husain made changes -
          Priority Critical [ 2 ] Minor [ 4 ]
          Component/s Build [ 12310212 ]
          Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
          Summary error occured when run project with velocity first time can't load macros in file loaded with #parse
          Bugzilla Id 33750
          Fix Version/s 1.5 [ 12310253 ]
          Component/s Source [ 12310214 ]
          Description I think this is a big bug. I've used velocity in my projects, erveything is ok
          but this. i want to know it's this problem will be resolved in next version? if
          it's not, i have to abandon velocity.
          the bug is :
          from doc:
           This is important to remember if you try to #parse() a template containing
          inline #macro() directives. Because the #parse() happens at runtime, and the
          parser decides if a VM-looking element in the template is a VM at parsetime,
          #parse()-ing a set of VM declarations won't work as expected. To get around
          this, simply use the velocimacro.library facility to have Velocity load your
          VMs at startup.
          I think this is a big bug. I've used velocity in my projects, erveything is ok
          but this. i want to know it's this problem will be resolved in next version? if
          it's not, i have to abandon velocity.
          the bug is :
          from doc:
           This is important to remember if you try to #parse() a template containing
          inline #macro() directives. Because the #parse() happens at runtime, and the
          parser decides if a VM-looking element in the template is a VM at parsetime,
          #parse()-ing a set of VM declarations won't work as expected. To get around
          this, simply use the velocimacro.library facility to have Velocity load your
          VMs at startup.
          Environment Operating System: All
          Platform: All
          Operating System: All
          Platform: All
          Will Glass-Husain made changes -
          Link This issue is duplicated by VELOCITY-277 [ VELOCITY-277 ]
          Will Glass-Husain made changes -
          Bugzilla Id 33750
          Fix Version/s 1.5 [ 12310253 ]
          Fix Version/s 1.6 [ 12310290 ]
          Nathan Bubna made changes -
          Type Bug [ 1 ] Improvement [ 4 ]
          Bugzilla Id 33750
          Nathan Bubna made changes -
          Link This issue is duplicated by VELOCITY-448 [ VELOCITY-448 ]
          Henning Schmiedehausen made changes -
          Component/s Source [ 12310214 ]
          Component/s Engine [ 12311337 ]
          Bugzilla Id 33750
          Henning Schmiedehausen made changes -
          Fix Version/s 1.6 [ 12310290 ]
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Will Glass-Husain made changes -
          Resolution Won't Fix [ 2 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Will Glass-Husain made changes -
          Fix Version/s 1.6 [ 12310290 ]
          Supun Kamburugamuva made changes -
          Attachment patch.zip [ 12364126 ]
          Supun Kamburugamuva made changes -
          Attachment small.patch [ 12364588 ]
          Will Glass-Husain made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Workflow jira [ 12325237 ] Default workflow, editable Closed status [ 12551565 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551565 ] jira [ 12552450 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              whxbb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development