• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

As designed 2 add-on XML options bugs

HWS

Well-known member
#1
I tried to include a default Xenforo option into the option group of my an add-on. This can be done easily with just marking a checkbox and configuring the display order.

However this setting won't be exported into the add-on's XML without warnings. A new additional group relation should be exported also, even for default Xenforo options.

I tried to circumvent this issue and recreated the default Xenforo option but with a new additional group relation in my XML. This works, but the default Xenforo option does get associated with my add-on silently and therefore would be deleted if the add-on gets deinstalled. This should not happen.

It looks like you automatically assume the add-on id in the parent node of the add-on XML for all its child nodes. BTW, this is just the opposite you do with language XMLs. ;-)
 

Mike

XenForo developer
Staff member
#2
The association of an add-on is handled at the option level and the group associations are considered part of that. Hence, you are trying to manipulate a XenForo option, so as such it won't be part of your add-on and cannot be exported.

So what you're trying to do isn't something it's designed to do.
 

HWS

Well-known member
#3
The association of an add-on is handled at the option level and the group associations are considered part of that. Hence, you are trying to manipulate a XenForo option, so as such it won't be part of your add-on and cannot be exported.

So what you're trying to do isn't something it's designed to do.
Thank you for answering.

Please note, that someone currently IS ABLE to include a default Xenforo option into his add-on's XML and the default Xenforo option DOES get associated with the new add-on SILENTLY.

This can even be considered a security risk, since someone could create a useless add-on and could delete or even change several default Xenforo options with it.
 

Mike

XenForo developer
Staff member
#4
You always need to trust what you're installing - you're letting people run arbitrary code on your system so they can do what they want. The core XF data can always be recreated as necessary when importing master data.

Please note that while you could ship the option in your add-on, as soon as XF is upgraded, your changes (to the option structure) will be lost.