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

Plugin does not work in my testing environment of vanilla 2.2.1[RESOLVED]

This discussion is related to the Latest Discussion addon.
steamsteam www.planamigo.org - #1 foro planes amigo
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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 www.planamigo.org - #1 foro planes amigo
    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.

  • steamsteam www.planamigo.org - #1 foro planes amigo

    @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.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @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"


  • steamsteam www.planamigo.org - #1 foro planes amigo

    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.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 www.planamigo.org - #1 foro planes amigo
    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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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 www.planamigo.org - #1 foro planes amigo
    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.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    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

    R_J
  • steamsteam www.planamigo.org - #1 foro planes amigo
    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;
       // }
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok , try

    discussionsController_betweenRenderAsset_handler

  • steamsteam www.planamigo.org - #1 foro planes amigo
    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.