Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Forum won't display on mobile device

meshugymeshugy Musician/Hacker ✭✭

I'm not sure, but I don't think I've checked my forum on a mobile device since I upgraded to 2.1b2. It displayed fine on a mobile device with 2.0.18 but is now just completely blank with no content loading at all.

http://www.djangobooks.com/vanilla-forum/

I tried numerous different themes and disabled all plugin but nothing helped. Any ideas what the problem is?

Thanks,

Michael

«1

Comments

  • Options

    I think if you are going to use 2.1b2 you have to expect these problems.

    It is actually your responsibility as a beta tester to report and even diagnose these issues.

    grep is your friend.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    If you are getting a blank page, try enabling debugging.

    http://vanillawiki.homebrewforums.net/index.php/Bonk_Errors

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    guessing it is smarty.

    grep is your friend.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    I am guessing it is a bug in the framework ;)

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    bets are on.

    grep is your friend.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    ok, debugging is on:

    Fatal error: Call to undefined function admincheck() in/home/gypsypicking/djangobooks.com/vanilla-forum/applications/vanilla/views/discussions/index.php on line 6

  • Options

    the appropriate place to report this in on github

    @hgtonight you win.

    grep is your friend.

  • Options

    I think your mobile them my override helper_functions.php with an older version

    You can copy this to conf/bootstrap.before.php

    <?php if (!defined('APPLICATION')) exit();
    // yada yada
    if (!function_exists('AdminCheck')) {
    function AdminCheck($Discussion = NULL, $Wrap = FALSE) {
       static $UseAdminChecks = NULL;
       if ($UseAdminChecks === NULL)
          $UseAdminChecks = C('Vanilla.AdminCheckboxes.Use') && Gdn::Session()->CheckPermission('Garden.Moderation.Manage');
    
       if (!$UseAdminChecks)
          return '';
    
       static $CanEdits = array(), $Checked = NULL;
       $Result = '';
    
       if ($Discussion) {
          if (!isset($CanEdits[$Discussion->CategoryID]))
             $CanEdits[$Discussion->CategoryID] = GetValue('PermsDiscussionsEdit', CategoryModel::Categories($Discussion->CategoryID));
    
    
    
          if ($CanEdits[$Discussion->CategoryID]) {
             // Grab the list of currently checked discussions.
             if ($Checked === NULL) {
                $Checked = (array)Gdn::Session()->GetAttribute('CheckedDiscussions', array());
    
                if (!is_array($Checked))
                   $Checked = array();
             }
    
             if (in_array($Discussion->DiscussionID, $Checked))
                $ItemSelected = ' checked="checked"';
             else
                $ItemSelected = '';
    
             $Result = <<<EOT
    <span class="AdminCheck"><input type="checkbox" name="DiscussionID[]" value="{$Discussion->DiscussionID}" $ItemSelected /></span>
    EOT;
          }
       } else {
          $Result = '<span class="AdminCheck"><input type="checkbox" name="Toggle" /></span>';
       }
    
       if ($Wrap) {
          $Result = $Wrap[0].$Result.$Wrap[1];
       }
    
       return $Result;
    }
    }
    

    I can't promise this is the only issue.

    grep is your friend.

  • Options
    peregrineperegrine MVP
    edited December 2013

    curious.

    it works with default mobile theme on my test version in 2.1b2,

    and you have removed the .ini files from your cache folder as well?

    what theme are you using for the mobile theme and did you modify it?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @x00 said:
    I think your mobile them my override helper_functions.php with an older version

    You can copy this to conf/bootstrap.before.php

    I tried that but it made even the desktop view totally blank.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    curious.

    it works with default mobile theme on my test version in 2.1b2,

    and you have removed the .ini files from your cache folder as well?

    there were some in there but I removed them and still have the same problem

    what theme are you using for the mobile theme and did you modify it?

    I'm using the embed friendly theme for the desktop view. The only mobile theme I have is the default one which I assume Vanilla will use when a mobile device is detected. Is there something I need to set somewhere? 2.0.18 just switched the mobile theme automatically.

  • Options

    $Configuration['Garden']['MobileTheme'] = 'mobile';

    should point to your mobile theme.

    I would consider reinstalling core files. Because unless I'm missing something, the mobile theme works perfectly (that is no error), if installed correctly.

    However, first things first, i would disable plugins one by one - and see if a plugin is causing a weird problem in the mobile theme.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    I added the mobile config and reinstalled all core files. I'm still receiving the same error.

    I tried disabling all the plugins before but will try again.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    every single plugin is off, still receiving the same error:

    Fatal error: Call to undefined function admincheck() in/home/gypsypicking/djangobooks.com/vanilla-    forum/applications/vanilla/views/discussions/index.php on line 6
    
  • Options
    ShadowdareShadowdare r_j MVP
    edited December 2013

    What OS and version of PHP is installed? You can find out by making a file with the .php extension, name it anything, copy this code in it, and open the link of the file on your website if you don't know:

    <?php
    echo "Operating System: " . php_uname();
    echo "\nCurrent PHP version: " . phpversion();
    ?>
    

    Add Pages to Vanilla with the Basic Pages app

  • Options
    peregrineperegrine MVP
    edited December 2013

    /home/gypsypicking/djangobooks.com/vanilla- forum/applications/vanilla/views/discussions/index.php on line 6

    post the first 10 lines from

    forum/applications/vanilla/views/helper_functions.php

    also look in your themes for helper_functions.php (if it exists that may be causing problem)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @Shadowdare said:
    What OS and version of PHP is installed?

    I'm on Dreamhost and my VPS is running on PHP 5.3 Fast

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @peregrine said:
    /home/gypsypicking/djangobooks.com/vanilla- forum/applications/vanilla/views/discussions/index.php on line 6

    post the first 10 lines from

    forum/applications/vanilla/views/helper_functions.php

     <?php if (!defined('APPLICATION')) exit();
    $Session = Gdn::Session(); 
    if (!function_exists('WriteComment'))
       include $this->FetchViewLocation('helper_functions', 'discussion');
    
    // Wrap the discussion related content in a div.
    echo '<div class="MessageList Discussion">';
    
    // Write the page title.
    echo '<!-- Page Title -->
    <div id="Item_0" class="PageTitle">';
    
    echo '<div class="Options">';
    
    $this->FireEvent('BeforeDiscussionOptions');
    WriteBookmarkLink();
    WriteDiscussionOptions();
    WriteAdminCheck();
    
    

    also look in your themes for helper_functions.php (if it exists that may be causing problem)

    The embed friendly theme does not have this file but I did find it in the mobile them:

    themes/mobile/views/discussions/helper_functions.php

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Have you tried other mobile themes ?

    Try Mobile, or YellowMobile, or even glass Mobile. They all work with 2.1 . May be a theme related issue.

    To change the mobile theme just replace the name of the theme in the configuration pertaining to mobile theme in config.php .

  • Options
    peregrineperegrine MVP
    edited December 2013

    @meshugy

    1)post the first 10 lines from

    forum/applications/vanilla/views/helper_functions.php

    you didn't post the lines from the correct file. look at the location. but it is not necessary if you follow step below.


    @peregrine said:
    also look in your themes for helper_functions.php (if it exists that may be causing problem)

    @meshugy said:

    The embed friendly theme does not have this file but I did find it in the mobile them:

    themes/mobile/views/discussions/helper_functions.php

    • the mobile them in 2.1b2 does NOT have a

    helper_functions.php

    nor does it have a discussions folder.

    you need to remove folder /mobile entirely.

    and re-install the /mobile from vanilla 2.1b2

    when upgrading, there maybe left over remnants from previous versions (especially views) you will have problems

    if you do this I guarantee your problem will go away
    
    
    nor does it have a discussions folder.
    
    you need to remove folder /mobile entirely.
    
    and re-install the /mobile from vanilla 2.1b2
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.