vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hooks related to private messages not working? (https://vborg.vbsupport.ru/showthread.php?t=206220)

Zahl 02-22-2009 01:08 PM

Hooks related to private messages not working?
 
Hi there,

is it possible that there is some feature/function or something else that prevents plugins that hook some private message related stuff from being executed? I checked the general settings for hooks, but there I can just enable or disable hooks completely.
Maybe its just me, but I tried to add a hook for private_insertpm_complete and it just did nothing. First I checked my code again and again, added ebug outputs, and in the end, I just typed in some random stuff that is not valid PHP Code, so I expected to get a "parse error in eval()'d code" when I would try to send a private message, but it still worked, no errors.
Then I tried to hook pmdata_postsave, but also no luck.
And yes, I selected "activate this plugin" ;)
Other hooks work just fine, like reputation_add_complete...

Any help would be appreciated.

ragtek 02-22-2009 01:29 PM

whats happening if you try [php]die('here it should stop'); ???
thats the way, i debug/check my plugins/hook positions

Zahl 02-22-2009 06:09 PM

Just tried that, and it still executes as if there was no plugin :(

Zahl 02-24-2009 01:03 PM

Could some other addon or plugin cause this, technically?
There are no plugins that directly hook any private message stuff, but still...

This is really annoying and I have no clue where to start looking for the cause.

Lynne 02-24-2009 02:26 PM

Are you sure you are doing an action that actually uses the plugin where you have it hooked?

Zahl 02-24-2009 03:43 PM

Well... private_insertpm_complete should definetely be triggered when you send a pm, no?
At least as far as I understand by reading the source of private.php

Lynne 02-24-2009 04:24 PM

That hook should get processed if everything is fine in the PM. Is the PM being sent?

Zahl 02-24-2009 04:49 PM

Yep, I already annoyed several people in my forum with test messages. ;)
I still have die("test"); as plugin code, but it just takes me to my inbox again after sending.
Also tried to hook private_insertpm_process, which should be triggered both, when actually sending the pm and when just displaying a preview... But no luck.

Its either me being very stupid or something is really broken... (Running 3.6.7 btw)

EDIT: Hooking private_start works...

ragtek 02-24-2009 05:02 PM

Strange, if i create a plugin at insertpm_complete with die('here'); it stops here

have you maybe some other plugins at this hook which redirect on some other side?

Zahl 02-24-2009 05:32 PM

No, there are no private_* related plugins, that's what confuses me too.
I'm gonna disable all addons except mine now, let's see if that helps.


All times are GMT. The time now is 02:32 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01025 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete