Justis R
Member
Hey there, I’m just getting started with XF development and I’m both baffled and confused at the moment.
My understanding of the class extension system was that as long as your class extension has a higher execution order than all of the others, it’ll be executed last and therefore have the final say in the return value.
My website is using an addon (SV\ContentRatings) which overrides XF's ConversationMessage#reactionsCounted implementation to return true rather than false. This wasn’t configurable, so I made my own class extension on the same XF class to change the return value back to false and set my execution order to be higher.
Theirs was 3, so I expected 10 to work, but it didn’t. The reactions were still counting. I upped mine to 100, no change. Upped it to 1,000, no change. Upped it to 10,000 and suddenly the reactions weren’t being counted. It seems my extension is finally having the final say.
I reduced it back down and up again and had the same results.
This goes against what I understood about the class extension system, so I was hoping someone could help shed some light on what’s happening here.
My understanding of the class extension system was that as long as your class extension has a higher execution order than all of the others, it’ll be executed last and therefore have the final say in the return value.
My website is using an addon (SV\ContentRatings) which overrides XF's ConversationMessage#reactionsCounted implementation to return true rather than false. This wasn’t configurable, so I made my own class extension on the same XF class to change the return value back to false and set my execution order to be higher.
Theirs was 3, so I expected 10 to work, but it didn’t. The reactions were still counting. I upped mine to 100, no change. Upped it to 1,000, no change. Upped it to 10,000 and suddenly the reactions weren’t being counted. It seems my extension is finally having the final say.
I reduced it back down and up again and had the same results.
This goes against what I understood about the class extension system, so I was hoping someone could help shed some light on what’s happening here.