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

Duplicate load_class_datawriter problems?

Discussion in 'Resolved Bug Reports' started by Jeremy, Oct 15, 2010.

  1. Jeremy

    Jeremy Well-Known Member

    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?
    Cezz likes this.
  2. Jeremy

    Jeremy Well-Known Member

  3. Shadab

    Shadab Well-Known Member

    :eek: :eek:
  4. Jeremy

    Jeremy Well-Known Member

    I know, I know. It's 1 and I'm tired. haha. He corrected me already.
  5. Andy.N

    Andy.N Well-Known Member

    Cezz is formerly Ceri May, is it a she or he?
    The profile says Male.
  6. Jeremy

    Jeremy Well-Known Member

    Its a he.
  7. Andy.N

    Andy.N Well-Known Member

    Sure. You used "she" several times in your post so i was thinking it's not a mistake.
  8. Cezz

    Cezz Well-Known Member

    Yeah I am definitely Male... Or at least was last time I checked... one sec...

    Yep still Male... :)
    Jeremy likes this.
  9. Jeremy

    Jeremy Well-Known Member

    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!
  10. Andy.N

    Andy.N Well-Known Member

    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 ;)
    Jeremy likes this.

Share This Page