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 does not work in my testing environment of vanilla 2.2.1[RESOLVED]

steamsteam
edited September 2016 in Vanilla 2.0 - 2.8

Hi,
I have tried the plugin and I think it is not working properly. At least in my testing environment of vanilla 2.2.1

It does sort when you choose the option last commented or last created.
The discussions do not move from his ordination.

However when I change in administration panel "Sort discussions by"... Discussions are ordered according to the criterion.
I do not understand why it does not work in my environment.

Another thing I like to do, is show the plugin message after title page. Now it is shown above title of the page.
I tried to replace discussionsController_beforeRenderAsset_handler by DiscussionsController_AfterPageTitle_Handler but its does not work.

Thanks in advance.

Comments

  • I guess it interferes with another plugin. Please disable all other plugins, try if it works and the re-enable all of your plugins one by one. After you've told me what plugin does not work with my plugin, I can try to find a solution.

  • steamsteam
    edited September 2016

    @R_J dijo:
    I guess it interferes with another plugin. Please disable all other plugins, try if it works and the re-enable all of your plugins one by one. After you've told me what plugin does not work with my plugin, I can try to find a solution.

    Hi @R_J !

    I don't know what happening...

    I have disabled all plugins and all applications, have cleared cache and still unordered discusions, but ordering through administration panel.

    I can send you link by private message and password to access on my test environment like admin if you want. I don't want to publish it here.
    Or give me some suggestion to check more.

    Thanks.

  • @steam dijo:

    @R_J dijo:
    I guess it interferes with another plugin. Please disable all other plugins, try if it works and the re-enable all of your plugins one by one. After you've told me what plugin does not work with my plugin, I can try to find a solution.

    Hi @R_J !

    I don't know what happening...

    I have disabled all plugins and all applications, have cleared cache and still unordered discusions, but ordering through administration panel.

    I can send you link by private message and password to access on my test environment like admin if you want. I don't want to publish it here.
    Or give me some suggestion to check more.

    Thanks.

    To discard my tests and settings I installed from scratch vanilla 2.2.1 (no extra plugin) and have enabled plugin Latest Discussion. The plugin does not order ( ...

    Something has changed in version 2.2.1 vanilla if the previous work.

  • @steam said:
    I can send you link by private message and password to access on my test environment like admin if you want. I don't want to publish it here.
    Or give me some suggestion to check more.

    Thanks.

    That would be easiest. I still do not understand what you mean by "ordering through admin panel"

  • I still do not understand what you mean by "ordering through admin panel"

    I mean sort descussions: Forum Settings->Advanced->Sort discussions by

    1 most recent comments
    2 start time

    This functionality pretend to do plugin, not ?

    I send you access data by private message.

  • Okay, I see! After that setting has been used, my plugin really has no effect. I'll take a look at that, but I'm pessimistic that it would be possible.

    Please try to delete $Configuration['Vanilla']['Discussions']['SortField'] = ... from your conf/config.php and see if the plugin is usable afterwards.

    That would restrict you to never use the sort order in the dashboard or else my plugin wouldn't work. That would be quite ugly though...

  • steamsteam
    edited September 2016

    @R_J dijo:
    Okay, I see! After that setting has been used, my plugin really has no effect. I'll take a look at that, but I'm pessimistic that it would be possible.

    Please try to delete $Configuration['Vanilla']['Discussions']['SortField'] = ... from your conf/config.php and see if the plugin is usable afterwards.

    That would restrict you to never use the sort order in the dashboard or else my plugin wouldn't work. That would be quite ugly though...

    I have commented the line
    $ Configuration [ 'Vanilla'] [ 'Discussions'] [ 'SortField'] = 'd.DateLastComment';

    on my config file and no effect, the plugin does not sort (

    I have also cleared the cache and turn off on the plugin

  • Very strange indeed. I cannot understand what is happening there, since the plugin is really simple.

    Please try to replace "===" with "==", but I do not think this would change anything.

    Also please check the table GDN_UserMeta and check for rows with the name "Plugin.Latest.Enabled". Are there any?

  • steamsteam
    edited September 2016

    @R_J dijo:
    Very strange indeed. I cannot understand what is happening there, since the plugin is really simple.

    Please try to replace "===" with "==", but I do not think this would change anything.

    Also please check the table GDN_UserMeta and check for rows with the name "Plugin.Latest.Enabled". Are there any?

    Bingo @R_J !!!

    Replacing all "===" on the code with "==" is working now !

    I like to do now, is show the plugin message after title page. For now it is showing above title of the page.
    I tried to replace discussionsController_beforeRenderAsset_handler by DiscussionsController_AfterPageTitle_Handler but its does not work.

    You can see how the message is now above the title on the link - http://www.planamigo.org/discussions

    Can you suggest something about that?

    Thanks.

  • Did you try ?

    discussionsController_afterRenderAsset_handler

    Look at the class.controller.php to see what and how events are fired or try the eventi plugin to see how events are fired and rendered

  • steamsteam
    edited September 2016

    @vrijvlinder dijo:
    Did you try ?

    discussionsController_afterRenderAsset_handler

    Look at the class.controller.php to see what and how events are fired or try the eventi plugin to see how events are fired and rendered

    Hi @vrijvlinder

    discussionsController_afterRenderAsset_handler - is putting message to sort after showing all discussions in the bottom

    DiscussionsController_BeforeDiscussionName_Handler - is showing order message but you need to comment:

        //if ($args['AssetName'] !== 'Content' || Gdn::session()->UserID == 0) {
       //     return;
       // }
    
  • Ok , try

    discussionsController_betweenRenderAsset_handler

  • steamsteam
    edited September 2016

    Finally I have put on DiscussionsController_AfterPageTitle_Handler
    and I have commented:

    //if ($args['AssetName'] !== 'Content' || Gdn::session()->UserID == 0) {
    // return;
    // }

    Now it works ...

    Thanks for help and plugin, greetings !

Sign In or Register to comment.