vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hook system disabled during logout? (https://vborg.vbsupport.ru/showthread.php?t=195123)

requiemfohx 11-01-2008 07:50 AM

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!

Dismounted 11-01-2008 09:57 AM

When logging out, the navbar is not shown, nor is it parsed in the first place.

requiemfohx 11-01-2008 10:43 AM

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.

Dismounted 11-01-2008 01:24 PM

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.

requiemfohx 11-01-2008 01:58 PM

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.

Dismounted 11-02-2008 03:41 AM

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?

requiemfohx 11-02-2008 09:17 AM

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.

requiemfohx 11-11-2008 12:33 AM

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...


All times are GMT. The time now is 04:43 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.01046 seconds
  • Memory Usage 1,733KB
  • 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
  • (9)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete