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

2 Add-ons manipulating router

R

ragtek

Guest
#1
What will happen if i have 2 or more add-ons manipulating the buildlink method?
In a quick test, they stopped working (and that's logic, because i don't call parent::buildLink)

second scenario which also not worked:

add-on 1: overrides the match method

add-on 2: overrides the buildlink method.

problem: the code of add-on 2 isn't called
if i implement the buildLink from add-on2 into add-on 1 it's working, but having 2 seperate routes doesn't work.

Hope you know what i mean
 

Mike

XenForo developer
Staff member
#3
What will happen if i have 2 or more add-ons manipulating the buildlink method?
In a quick test, they stopped working (and that's logic, because i don't call parent::buildLink)
I'd suggest that manipulations here are probably mutually exclusive, unless they're for specific cases, in which case you'd need to call the parent when your case wasn't hit and then that should work.

second scenario which also not worked:

add-on 1: overrides the match method

add-on 2: overrides the buildlink method.

problem: the code of add-on 2 isn't called
if i implement the buildLink from add-on2 into add-on 1 it's working, but having 2 seperate routes doesn't work.

Hope you know what i mean
I don't see why this would happen as the class is resolved in the same way as classes like models.