Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3979

Callbacks from macros.vm to local page macro is not possible anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 1.9
    • Velocity
    • Unknown
    • N/A
    • N/A

    Description

      It looks like the velocity upgrade to 1.6.2 has made callbacks from the main macros (macros.vm) to a local page macro impossible. This used to work on 1.8.x.
      The following in syntax 1.0 worked in 1.8.x and now does not work in 1.9 release

      In macros.vm add

      #macro(callback $param)
      #hello($param)
      #end

      In a page add:

      #macro(hello $param)
      Hello $param
      #end

      #callback("world")

      In 1.8 this would dispaly "Hello World". In 1.9 the macro hello is not found and #hello(...) is displayed.

      This is used in Curriki to be able to use a shared macro displaying a header, footer and other common elements, callback to a macro that only concerns the page. I don't have an easy way to workaround this change. Callbacks are usefull.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            ludovic Ludovic Dubost
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: