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.

Plugin not showing correctly in the dashboard

K17K17 Français / French Paris, France ✭✭✭
edited July 2016 in Vanilla 2.0 - 2.8

Hey :)
I've just installed the Reply plugin in my forum, but I don't know why, he's show like this:

And I Can't enable it, I got this error message:

FATAL ERROR IN: Gdn_PluginManager.testPlugin();

"The plugin folder was not properly defined."

LOCATION: /home/hide/public_html/demo/library/core/class.pluginmanager.php

1164: // Include the plugin, instantiate it, and call its setup method
1165: $PluginClassName = ArrayValue('ClassName', $PluginInfo, false);
1166: $PluginFolder = ArrayValue('Folder', $PluginInfo, false);
1167: if ($PluginFolder == '') {

1168: throw new Exception(T('The plugin folder was not properly defined.'));

1169: }
1170:
1171: $this->pluginHook($PluginName, self::ACTION_ENABLE, $Setup);
1172:

BACKTRACE:
[/home/hide/public_html/demo/applications/dashboard/controllers/class.settingscontroller.php 887] Gdn_PluginManager->testPlugin();
[/home/hide/public_html/demo/applications/dashboard/controllers/class.settingscontroller.php 887] SettingsController->testAddon();
[/home/hide/public_html/demo/library/core/class.dispatcher.php 329] PHP::call_user_func_array();
[/home/u819330550/public_html/demo/index.php 44] Gdn_Dispatcher->dispatch();

I use Vanilla 2.2.1 and Reply 0.1 :/

Comments

  • RiverRiver MVP
    edited July 2016

    @K17

    probably a result of:

    it does not comply with Vanilla 2.2.1 rules php 5.3 capable.

    shortcut arrays. it saves one word "array" and make it incompatible.

    try

    $PluginInfo['reply'] = [

    $PluginInfo['reply'] = array(

    and change bracket } to ) at end.

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

  • RiverRiver MVP
    edited July 2016

    actually other arrays may need to be changed as well or requirements need to be vanilla 2.3.x

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

  • RiverRiver MVP
    edited July 2016

    @R_J

    It's good to see you took initiative to replace an unsafe plugin EasyReply with yours Reply which does not have the safestyles false. great.

    I see a minor bug in your initial release. duplicate forum folder in ultimate url

    since anchor does the job of adding proper url and prepending domain and or http, etc, There is no need ot use url around the path. Otherwise you double up on the forum folder name if vanilla it becomes

    /vanilla/vanilla/ in the linkage and can break some forums particularly on the messages.

    remove the url( and )

    this
    url('messages/add/'.urlencode($args['Author']->Name).'/'.$args['Discussion']->Name),

    should be

           'messages/add/'.urlencode($args['Author']->Name).'/'.$args['Discussion']->Name,
    

    and

    url('post/comment/'.$args['Discussion']->DiscussionID.'/'.urlencode($args['Author']->Name)),

    should be

             'post/comment/'.$args['Discussion']->DiscussionID.'/'.urlencode($args['Author']->Name),
    

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

  • K17K17 Français / French Paris, France ✭✭✭

    Thanks :) I'll try it when I can :)

  • R_JR_J Ex-Fanboy Munich Admin

    @River said:

    it saves one word "array" and make it incompatible.

    You are right: this has "more" requirements than Vanilla 2.2. I'll make a note (if I remember to do so).

    By the way: I was indifferent on using the short [] syntax" or the array() keyword until I read someone talking about some shortcomings that had forced PHP to use a function syntax for building arrays. From that moment on I cannot stop seeing the function syntax in array() and I would feel bad if I had to use it.

    Although I normally really like to stick to conventions, I will not respect this one.

  • R_JR_J Ex-Fanboy Munich Admin

    @River said:
    this
    url('messages/add/'.urlencode($args['Author']->Name).'/'.$args['Discussion']->Name),

    should be

           'messages/add/'.urlencode($args['Author']->Name).'/'.$args['Discussion']->Name,
    

    Another thing I've noted when I try things with this plugin was, that urlencoded slugs weren't decoded to correct RequestArguments. That's why I'm not sure that this urlencode part would make sense or if there is a bug somewhere.

    Something I want to dig deeper some day. Look at those two examples to see what I mean:
    http://vanillaforums.org/messages/add/user%20
    http://vanillaforums.org/messages/add/user%

Sign In or Register to comment.