Duplicate  load_class_datawriter problems?

Jeremy

in memoriam 1991-2020
OK, so Cezz and I have spent literally the last 4 hours working on this problem. For one of her add-ons, she wanted to perform an action on a thread after it was posted. Obviously, we added event listeners for the load_class_datawriter event, and looked for the class of XenForo_DataWriter_Discussion_Thread, and added her class in $extend[]. She over wrote Save so she could do whatever, then call parent::save(). However, the problem lies in the fact that her code never run. It took me a while (way to long) to realize that posting a thread is handled by XenForo_ControllerPublic_Forum, so once we got that... I delved into the code to find out how it created the thread... low and behold, it called XenForo_DataWriter_Discussion_Thread.

So, my question (and bug report?) is why was it never extended? I added several var_dump() and print statements into the code so that I could see what was being called... It seems that the XenForo_CodeEvent::fire() was never called for load_class_datawriter as it never showed up in my dumps.

Cezz could probably really use the datawriter class, as she needs to access at least the thread ID, but I got her on her way working and overwriting actionAddThread(). Bug? Freak Coding problem?
 
Sure. You used "she" several times in your post so i was thinking it's not a mistake.

That's cause I'm tired and really didn't care to check and for some reason the name Ceri May was in my head as a female. Oh well, sorry Cezz!
 
No problem. All is well. I def have the same impression after all these years :)
And I bet I'm not the only one.
Just that I thought you knew him in person. If we work with people we know online, misunderstandings like this are totally understandable.

Like Cezz said in his profile "Online, men are men, women are men and 12 year olds are FBI agents". Must be a reference to "To catch a predator" show ;)
 
Top Bottom