Please upgrade here. These earlier versions are no longer being updated and have security issues.

The error occurred on or near: forum/applications/vanilla/views/discussions/helper_functions.php

The forum returing this error, Not sure what is the issue, Any help would be greatly appriciated

==
475: */

476: function optionsList($discussion) {

477: if (Gdn::session()->isValid() && !empty(Gdn::controller()->ShowOptions)) {

478: include_once Gdn::controller()->fetchViewLocation('helper_functions', 'discussion', 'vanilla');

479: return getDiscussionOptionsDropdown($discussion);

480: }

481: return '';

482: }

483: endif;

Application: Vanilla
Application Version: 2.3
PHP Version: 7.0.8-0ubuntu0.16.04.3
Operating System: Linux
Server Software: nginx/1.10.0
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Request Uri: /forum/
Controller: PHP
Method: optionsList

Comments

  • LincLinc Director of Development Detroit Vanilla Staff
    edited November 2016

    What was the actual error?

    What PHP version are you using?

    Did you follow the troubleshooting guide on the docs site?

  • edited November 2016

    CODE:
    Fatal Error in PHP.optionsList();
    Call to undefined function getDiscussionOptionsDropdown()

    PHP 7
    Troubleshooting guide was followed.

    Thanks Linc

  • Ya, its PHP 7 and all necessary modules already enabled.

  • The default theme DOES work... the thing we don't quite understand is that the function its referencing that is missing, IS there. We've even tried defining it in the actual file.

    This was an upgrade from 2.1 to 2.2, and now to 2.3. Is that function no longer available... at all?

  • RiverRiver MVP
    edited November 2016

    isn't it here:

    https://github.com/vanilla/vanilla/blob/2d72dd56031dbe94da0036216aaacac3dd3f7666/applications/vanilla/views/discussion/helper_functions.php#L314

    maybe your NOT so default theme has a helper functions that is missing the function or are you saying it is no problem with default theme.

    does your theme override views?

    or do you override something in conf/bootstrap files.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Default theme appears to work without issue.

    The custom theme (which i inherited) was developed in 2012. I suppose the best course of action would be to duplicate the default theme, then re-customize it to match?

  • RiverRiver MVP
    edited November 2016

    @greyskymedia said:
    Default theme appears to work without issue.

    The custom theme (which i inherited) was developed in 2012. I suppose the best course of action would be to duplicate the default theme, then re-customize it to match?

    absolutely start with bittersweet or some other good theme.

    yes, if there are views and functions that are overridden you will see issues that might be blatant and fatal, or not noticeable but create security issues.

    I wouldn't touch an old theme with a 10 foot pole, especially one that overrides views, has js, or overrides functions.

    IMHO all old themes that haven't been updated provide potential security risks, unless they only change css. AND there are a number of old themes in the add-ons that might be better discarded (especially the abandoned ones), if the author was responsible. They provide bad code and bad examples for the current vanilla 2.3

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

    vineeth
  • Thank you River, I didn't realize how difficult this would get for the upgrade... I should have though...

  • @greyskymedia said:
    Thank you River, I didn't realize how difficult this would get for the upgrade... I should have though...

    a bit out of date regarding versions, but for the most part is the same steps if php 5.6

    if php 7.0 - obviously you can't upgrade to 7.0 before you upgrade vanilla.

    but the troubleshooting steps are pretty much the same.

    https://vanillaforums.org/discussion/31153/tutorial-a-fool-proof-way-to-do-a-vanilla-upgrade-from-2-1-to-2-2

    if your users can roll with the punches they might enjoy a new theme :)

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

    vineeth
  • Thanks. I'm sure we lost a little customization, but to be honest, it looks great. thanks for the help!

  • LincLinc Director of Development Detroit Vanilla Staff
    edited November 2016

    Yes, someone copied the helper_functions.php into a theme. That's generally a bad idea to ever do. You can overwrite a function by including it at the bottom of your themehooks file; we load themes before view-related functions, so the theme version will be the one that's made available. Copying the entire helper file into the theme basically guarantees it will break like this one day, because then you won't know when we add new functions.

    vineeth
Sign In or Register to comment.