Wikimedia Developer Support

ExampleExtension not working

I’ve copied the ExampleExtension code found at and find that it doesn’t work with my REL1_33 wiki. I’m not getting any error message, it’s just that the parser tag is output as if the extension isn’t installed. (Yes I’ve made sure to create the ExampleExtension.i18n.php file.) See for example.

Does anyone have this example working? I’m trying to create a real parser function extension to transform XML with XSL and have the same problem as the example (fails silently outputting as if the extension is not loaded).

I just tested the extension from the docs now, and it seems to work.

When I tested it on your wiki, the code {{#example:hello | hi | hey}} seems to work as well, although the example in the sandbox is missing the colon.

I re-added the colon that I took out as just a test. But I’m not seeing the output as

  • param1 is hello and param2 is hi and param3 is hey

I’m just seeing the original wikitext as

{{#example: hello | hi | hey}

I think there’s also a } missing at the end, should be two after they “hey”.

Thanks @Bawolff. I was staring at it the whole time.

Now I’ve got to figure out why the real extension I’m trying to build after the example exhibits the same flawed behavior (no error, text output). Example test page with invocation of

{{#xsl: | | parse=true | nocache = true}}

The issue that most sticks out is that the Hooks.php file is in a namespace but the extension.json file doesnt include the namespace anywhere when referencing class names.