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

XF 1.1 Blank page after replying to a thread

Discussion in 'Troubleshooting and Problems' started by Marco Famà, Sep 24, 2012.

  1. Marco Famà

    Marco Famà Active Member

    It happens all the time, and I don't understand why.
    If I reply to a thread, I get a total white page, with 0 data retrieved from server.

    But in fact, the reply is added properly, because if I refresh the page I suddendly see the whole thread, including my answer.

    Do you know why this happens?
    This is the URL:
    http://timelapseitalia.com/forum

    Thanks!
    Marco
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    A blank page is often a suppressed error. Try adding this line to your library/config.php file to see if that reveals any specific error message on the blank page:

    Code:
    ini_set('display_errors', true);
    
    Also check the log:

    Admin CP -> Tools -> Server Error Log
     
    Marco Famà likes this.
  3. Marco Famà

    Marco Famà Active Member

    thanks for your prompt reply!

    Don't know if this makes sense to you:



    Info Errore
    ErrorException: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: URL file-access is disabled in the server configuration -library/autosocial/Index.php:53
    Generato Da: Account Sconosciuto, 8 minuti fa
    Analisi dello Stack
    #0 [internal function]: XenForo_Application::handlePhpError('http://tinyurl....')
    #1 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/library/autosocial/Index.php(53): file_get_contents()
    #2 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/library/autosocial/CronEntry/PostThreads.php(7): autosocial_Index->__construct(Array)
    #3 [internal function]: autosocial_CronEntry_PostThreads::run(Array, Array)
    #4 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/library/XenForo/Model/Cron.php(356): call_user_func(Array)
    #5 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/library/XenForo/Cron.php(29): XenForo_Model_Cron->runEntry()
    #6 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/library/XenForo/Cron.php(64): XenForo_Cron->run()
    #7 /var/www/vhosts/timelapseitalia.com/httpdocs/forum/cron.php(12): XenForo_Cron::runAndOutput()
    #8 {main}
    Stato Richiesta
    array(3) {
    ["url"] => string(52) "http://timelapseitalia.com/forum/cron.php?1348471323"
    ["_GET"] => array(1) {
    [1348471323] => string(0) ""
    }
    ["_POST"] => array(0) {
    }
    }
     
  4. Russ

    Russ Well-Known Member

    Do you have something that possibly auto posts to like a twitter or something? I'd consider disabling that.
     
  5. Marco Famà

    Marco Famà Active Member

    well, I do... but it would post only when a thread is created ex-novo, not always...
    thanks for the hint, gonna try this!
     
  6. Marco Famà

    Marco Famà Active Member

    Did as you suggested, errors still occurr.
    No trace of it on ACP > Tools > Server Errors

    Will implement that code raw as suggested, and see if smth changes
     
  7. Marco Famà

    Marco Famà Active Member

    OK, adding the following line doesn't produce any output as well.
    Weird... :(
    ini_set('display_errors', true);
     
  8. Marco Famà

    Marco Famà Active Member

    Sorry, but noticed now that... I actually have a complete HTML which I'm attaching now.
    The point is: still see white page!! :-/
    How come?
    HTML code seems clean and good one..
     

    Attached Files:

  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    autosocial addon?

    And that addon apparently requires that allow_url_fopen is enabled in your PHP configuration (which yours is not).
     
  10. Marco Famà

    Marco Famà Active Member

    Jake are you sure?
    Cause disabling the addon (right now it is disabled) doesn't solve the issue.

    Any other suggestions? Something from xenforo staff?
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I am sure that error message names the "autosocial" addon, and I am sure that error means the autosocial addon is trying to open a URL but your PHP configuration doesn't allow it.

    Then that error may not be related to the problem.

    You still get a blank page? Adding that line to config.php doesn't affect the blank page? The idea is that the config edit should reveal a more detailed error on the blank page.
     
  12. Marco Famà

    Marco Famà Active Member

    hey Jake, thanks again.

    I've edited the config file as mentioned, but nothing shows up in any case. :(
    Have asked my provider to change that PHP parameter..

    any other solutions?
     
  13. HWS

    HWS Well-Known Member

    We had the same problem. It is caused by the javascript AJAX function which normally writes the new post directly into the DOM. If you use something that inadvertently intervenes in that process you get a blank page. In our case it was an ad which was thrown in via a javascript call.
     
    Marco Famà likes this.
  14. Marco Famà

    Marco Famà Active Member

    Cool... and how can I stop that bugging me? :-(
    Honestly, I woudln't like to remove ads from my forum.. you know, they're quite necessary.

    Maybe there's a way to edit this function so that, if it is a reply to a post occurring, the ads is not displayed?

    <xen:hook name="ad_message_body" />
    <xen:if is="!{$message.conversation_id}">
    <div style="display: block; float: right; vertical-align: middle">

    // here it goes my code

    </div>
    </xen:if>


    :(
    thanks for your great help, I'm sure it is the only thing I touched recently.. sigh
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I can take a look if you give me FTP and admin access.
     
  16. Marco Famà

    Marco Famà Active Member

    hey Jake,
    sorry just seen this.

    Do you believe I can edit that function:

    Code:
    <xen:hook name="ad_message_body" />
    <xen:if is="!{$message.conversation_id}">
    <div style="display: block; float: right; vertical-align: middle">
     
    // here it goes my code
     
    </div>
    </xen:if>
    so that I can make the DIV appear only in case xenForo is in viewMode not "post mode"?

    For the FTP coordinates: I'd try with this solution if it's possible.. cause I've also noticed that in a reply mode, the banner won't show up (cause the screen automatically gets to the bottom)

    Thanks again to you and the others,
    Marco
     
  17. Marco Famà

    Marco Famà Active Member

    P.S. Jake, I didn't know you were from xenForo staff BTW.... I'd appreciate your feedback on this issue... thanks
     
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Is that a template condition in the message template?

    Admin CP -> Appearance -> Templates -> thread_reply_new_posts

    Add the red code:

    Code:
    <xen:if is="{$firstUnshownPost}">
    	<li class="newMessagesNotice">{xen:phrase there_more_posts_to_display} <a href="{xen:link posts, $firstUnshownPost}#post-{$firstUnshownPost.post_id}">{xen:phrase view_them}</a></li>
    </xen:if>
    
    <xen:set var="$ajaxInsert">1</xen:set>
    
    <xen:foreach loop="$posts" value="$post">
    	<xen:include template="post" />
    </xen:foreach>
    
    Now you can use that variable in a condition in this template:

    Admin CP -> Appearance -> Templates -> message

    Code:
    <xen:if is="{$ajaxInsert}">
    
    </xen:if>
    
     
    Marco Famà likes this.
  19. Marco Famà

    Marco Famà Active Member

    hey Jake,
    how can I like your message 10 times? :)

    This seems to have solved the issue!!
    I'll keep you posted, should I encounter this problem again!

    Thanks mate, much appreciated!
     
  20. Marco Famà

    Marco Famà Active Member

    Hi Jake!
    Sorry for getting back to you here... just got a complain from some users.

    They say that the same issue (blank page) is experienced when editing the message.
    Do you believe it is possible to change this behavior also for those edited messages?

    That would be just great, to me.

    Thanks, hope you can help
    Marco
     

Share This Page