Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 11-01-2008, 07:50 AM
requiemfohx requiemfohx is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hook system disabled during logout?

I'm having a problem with a plugin not being processed on the logout page.

The plugin's hook location is global_start, it's execution order is 5, and the code is as follows:
Code:
$blah = implode('', file('blah.html'));
$blah is invoked in navbar. The template is completely stock, aside from $blah as follows:
Code:
		<input type="hidden" name="vb_login_md5password" />
		<input type="hidden" name="vb_login_md5password_utf" />
		</form>
		<!-- / login form -->
	$blah
	</td>
</if>
</tr>
</table>
<!-- / breadcrumb, login, pm info -->
It expands blah.html and displays it's contents properly under the login form on forumhome, forumdisplay, showthread and everywhere else that the login form would normally be present, but it does not show up on the page that is displayed when you log out. For what I'm doing, it really needs to show up particularly when you log out and I've tried everything I can think of so I'm hoping somebody here will know why.

Any ideas? Thanks in advance!
Reply With Quote
  #2  
Old 11-01-2008, 09:57 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When logging out, the navbar is not shown, nor is it parsed in the first place.
Reply With Quote
  #3  
Old 11-01-2008, 10:43 AM
requiemfohx requiemfohx is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not? Then how does the login form even show up on that page?
To be clear(I've also edited my original post for clarity), I am talking about the page with the vBulletin Message saying:
Code:
All cookies cleared!

    * Return to the page you were previously viewing
    * Go to forums index
The url in the browser is:
Code:
http://www.sitename.com/forums/login.php?do=logout&logouthash=xxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The debug output lists the navbar template as being present:
Code:
Template Usage:

    * (1)STANDARD_ERROR
    * (1)ad_footer_end
    * (1)ad_footer_start
    * (1)ad_header_end
    * (1)ad_header_logo
    * (1)ad_navbar_below
    * (1)footer
    * (1)forumjump
    * (1)gobutton
    * (1)header
    * (1)headinclude
    * (1)navbar
    * (1)navbar_link
    * (9)navbar_notifications_menubit
    * (4)option
    * (1)spacer_close
    * (1)spacer_open
It also appears in the template.
From the top of STANDARD_ERROR:
Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<if condition="$show['search_noindex']"><meta name="robots" content="noindex,follow" /></if>
$headinclude
	<title>$pagetitle</title>
$headinsert
</head>
<body>
$header
<if condition="$navbar">
$navbar
<else />
<br /><br /><br />
</if>
I've tried removing the conditional around $navbar and simply making it say $navbar like it does in FORUMHOME and etc, same result.

I looked through all of the logic in the navbar and STANDARD_ERROR templates carefully and I don't see any conditionals that would prevent $blah from being parsed, so that's why I'm wondering if the hook system itself is disabled on that page or something?

I've tried this on stock installs of 3.7.2 PL1 and 3.6.3, same result in both cases. All of the stuff I have pasted has been from 3.7.2 PL1.
Reply With Quote
  #4  
Old 11-01-2008, 01:24 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IIRC, the navbar isn't shown, but I my memory must be failing me. My apologies.

Check the "Hooks Run" (or something like that) part of the debug mode window. IIRC (again ), hooks are not run when a logout is being processed.
Reply With Quote
  #5  
Old 11-01-2008, 01:58 PM
requiemfohx requiemfohx is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From debug:
Code:
Hooks Called:

    * init_startup
    * fetch_userinfo_query
    * fetch_musername
    * fetch_userinfo
    * cache_permissions
    * style_fetch
    * cache_templates
    * global_start
    * parse_templates
    * notifications_list
    * global_setup_complete
    * userdata_start
    * userdata_doset
    * userdata_presave
    * moderatordata_start
    * error_fetch
    * userdata_postsave
    * logout_process
    * forumjump
    * navbits
    * navbits_complete
    * error_generic
The plugin is in global_start, which appears in the list. In the above list, all of the hooks it lists are a light grey color, with global_start being black.
Reply With Quote
  #6  
Old 11-02-2008, 03:41 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Grey means that the specific hook's plugins were not executed (or there were no plugins at that hook in the first place). Black means plugin(s) were executed.

So the plugin is executing. If you put a die() after $blah in the plugin, does it do anything?
Reply With Quote
  #7  
Old 11-02-2008, 09:17 AM
requiemfohx requiemfohx is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, good advice. Ok, so it is running the plugin. If I do that,
Code:
$blah = implode('', file('blah.html'));
die();
it displays a blank page on normal pages, as well as when you log out. Could the relative referencing of 'blah.html' be disrupted by the url when you logout possibly? Maybe it's trying to do something like .../forums/login.php/blah.html or somesuch?

edit: I've tried '/blah.html' which made it stop displaying everywhere. I thought that it may be relative to the root of the domain when referenced this way and this instance is in /forums, so I also copied blah.html to the documentroot, and it still did not display. Keeping it relative in some way is important because I do want to distribute this plugin when I'm done with it so I'd like to avoid using a full URL, local path to vBulletin, or anything like that which would require customization.

edit #2:
Code:
$blah = implode('', file('/home/username/public_html/forums/blah.html'));
Interesting. Same results from doing it this way. It displays on FORUMHOME and the rest, but not on the logout page. This eliminates any sort of problem like what I speculated about, I'm stumped again.
Reply With Quote
  #8  
Old 11-11-2008, 12:33 AM
requiemfohx requiemfohx is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any recommendations on where I can find a solution to this problem? I've already got 52 vBulletin licenses and will be getting more soon if this can get resolved...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:07 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.03898 seconds
  • Memory Usage 2,224KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (9)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete