Break #loadConfig macro from register_macros.vm

Hi everyone,

I’m opening a vote to ensure everyone is ok if I break the velocity macro #loadConfig defined in register_macros.vm as part of my work on Loading....

This macro was introduced in XWiki 11.9 as part of XWIKI-16623: Make password changing consistent (#1157) · xwiki/xwiki-platform@99e9389 · GitHub and I don’t think it was ever supposed to be an API: I’m planning to document clearly that it’s an internal macro and not an API.
I looked in xwiki-contrib and it’s not used anywhere.

This vote is opened for 3 days until tuesday 24th of October.

Here’s my +1.

+0

Best would be to not break anything ideally. Is there no alternative? You didn’t mention why you want to break it and why you couldn’t find alternatives. Also you didn’t mention what “breaking” means and what would happen for scripts which were using it.

Also XWIKI-16623: Make password changing consistent (#1157) · xwiki/xwiki-platform@99e9389 · GitHub seems to have moved the macro from XWIKI-16623: Make password changing consistent (#1157) · xwiki/xwiki-platform@99e9389 · GitHub but not introduced it, right?

Thanks

There is an alternative: I can keep the current macro in our code base and create a new one with another name. The proposal here is basically to get rid of this macro. I’m globally refactoring the way it works (which is the root cause of the bug in Loading...) with different arguments.

The reason why I want to just get rid of it is that with my work we’d keep a velocity macro without using it in XS and so without any further testing on it. For something that is probably never used outside of XS.

Also XWIKI-16623: Make password changing consistent (#1157) · xwiki/xwiki-platform@99e9389 · GitHub seems to have moved the macro from XWIKI-16623: Make password changing consistent (#1157) · xwiki/xwiki-platform@99e9389 · GitHub but not introduced it, right?

Indeed I’ve been a bit fast in my check. Was introduced in XAADMINISTRATION-114: Extract successful registration message to a ne… · xwiki/xwiki-platform@fa1e1a7 · GitHub but was only defined in XWiki.RegistrationConfig back then, not in a velocity template, until the change I mentioned.

+0

Thanks,
Marius

Can’t do that + move the deprecated method to legacy?

We’re talking about a velocity macro in a template here. Moving to legacy mean that someone will still have to load the template to use it. So I don’t really see the point here, as it won’t help the backward compatibility.

Right now I have 3 votes with 1 +1 and 2 +0. I will extend a bit more the vote until next week so monday 6th of november but you can already see the changes on my PR (still a work in progress but it already shows the breakage): XWIKI-17510: The reset password functionality is not affected by password strength rules by surli · Pull Request #2488 · xwiki/xwiki-platform · GitHub

Closing this vote as accepted with 1 +1 and 2 +0.