We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39982
    • 28 Posts
    Hello!

    I have installed Discuss 1.2-pl Forum extra to MODX Revo 2.3.2 and it seems to work fine. I can make new user and user gets activation e-mail. User can login, write a note, update profile, but user can’t logout from forum. I follow the instructions and modify all necessary system settings under Discuss, but something still missing?

    Logout button is in the right corner and when clicked it opens default error page.

    I have the following in Resources and Content inside.

    In Login Resource
    [[!Login?
        &preHooks=`preHook.DiscussLogin`
        &postHooks=`postHook.DiscussLogin`
    ]]


    In Forums Resource
    [[!Discuss]]


    error.log
    [2015-07-23 09:07:16] (ERROR @ /index.php) Error HY000 executing query: SELECT `modSnippet`.`id` AS `modSnippet_id`, `modSnippet`.`source` AS `modSnippet_source`, `modSnippet`.`property_preprocess` AS `modSnippet_property_preprocess`, `modSnippet`.`name` AS `modSnippet_name`, `modSnippet`.`description` AS `modSnippet_description`, `modSnippet`.`editor_type` AS `modSnippet_editor_type`, `modSnippet`.`category` AS `modSnippet_category`, `modSnippet`.`cache_type` AS `modSnippet_cache_type`, `modSnippet`.`snippet` AS `modSnippet_snippet`, `modSnippet`.`locked` AS `modSnippet_locked`, `modSnippet`.`properties` AS `modSnippet_properties`, `modSnippet`.`moduleguid` AS `modSnippet_moduleguid`, `modSnippet`.`static` AS `modSnippet_static`, `modSnippet`.`static_file` AS `modSnippet_static_file`, `Source`.`id` AS `Source_id`, `Source`.`name` AS `Source_name`, `Source`.`description` AS `Source_description`, `Source`.`class_key` AS `Source_class_key`, `Source`.`properties` AS `Source_properties`, `Source`.`is_stream` AS `Source_is_stream` FROM `modx_site_snippets` AS `modSnippet` LEFT JOIN `modx_media_sources` `Source` ON `modSnippet`.`source` = `Source`.`id` WHERE `modSnippet`.`name` = ? ORDER BY `modSnippet`.`id` ASC  - Array
    (
        [0] => HY000
        [1] => 1267
        [2] => Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
    )
    
    [2015-07-23 09:12:31] (ERROR @ /index.php) `[[*1]]` is not a valid integer and may not be passed to makeUrl()
    


    Thank you advance!
    Tom [ed. note: tom333z last edited this post 8 years, 9 months ago.]
      • 46886
      • 1,154 Posts
      Hi let me see if I can help. I think the issue should be your login snippet.

      First of all that error is weird, whats going on there do you have some foreign characters in your site? collation issues wouldn't seem to affect logout but...

      Anyway right now what I notice is no login resource id number. This should mean no login at all, but the discuss wrapper.tpl is set up to work automatically...

      Here is what I have:
      <div>[[!Login? &preHooks=`preHook.DiscussLogin` &loginResourceId=`20` &logoutTpl=`lgnLogoutTpl2` &postHooks=`postHook.DiscussLogin`]]</div>


      I could be wrong but this login resource needs to be there I think.

      Also, keep in mind in the system settings for discuss include some issues like this. That's how the default login in discuss works directly.

      Hmm hope this helps, this is a weird problem. But I dont think the collation issue is related, is it happening everytime you logout?
        • 46886
        • 1,154 Posts
        Ok I think I figured this out. Pls have a look at line 60 or so in wrapper.tpl which is at core/components/discuss/themes/default/pages/wrapper.tpl

        Here is what I have there:
        <a class="m-user_tools_logout" href="[[~24? &service=`logout` &discuss=`1`]]" title="[[%discuss.logout]] [[+discuss.user.username]]">[[%discuss.logout]]</a>


        This may be a bug in discuss, i can't remember clearly but ~24 will be the reference to my logout resource, which is needed to logout.

        The other values here are in discuss system settings, including register and login (on page 3 of 4), but logout is missing, and I apparently just hard-coded the proper resource id, that's my MO to a T.

        It seems strange we need a login and a logout resource, when they are both the same, but so be it...you don't need the logout template, the default template will be used automatically.

        Ok, I think this will solve your problem, let me know how it goes.
          • 39982
          • 28 Posts
          Hello!

          Thank you nuan88 for your help.

          Now everything works like a charm. One thing I also found is on that Forum resource belongs only two Resource Groups and I deactivate Forum resource from these. I think this was a major problem for the Forum resource. I found that answer from Bob’s website. Thank you Bob.

          I have the following on the Login resource and logoutResourceId directs to the main Forum resource page.
          [[!Login?
              &preHooks=`preHook.DiscussLogin`
              &postHooks=`postHook.DiscussLogin`
              &loginTpl=`lgnLoginTpl`
              &logoutTpl=`lgnLogoutTpl`
              &errTpl=`lgnErrTpl`
              &logoutResourceId=`235`
          ]]


          wrapper.tpl file configuration on line 61
          core/components/discuss/themes/default/pages/wrapper.tpl
           <a class="m-user_tools_logout" href="[[~[[++discuss.login_resource_id]]? &service=`logout` &discuss=`235`]]" title="[[%discuss.logout]] [[+discuss.user.username]]">[[%discuss.logout]]</a>
          


          ...But now I figure out some other problem. When I try to delete Thread from manager with admin rights I can’t do it.

          I click the Thread and the first opening window says – like it should so I think this is normal.
          ”Are you sure you want to permanently remove this log entry?”

          But after I click ”Yes” the following Error message popup ”Processor not found: mgr/thread/remove”. It gives me the option to click OK, but nothing happens for the Thread and it’s still there. What is that ”Processor” error message and how could I delete Thread from manager?

          ...And yes I have foreign characters on my site, should I take that error.log message seriously?

          error.log
          [2015-07-23 09:07:16] (ERROR @ /index.php) Error HY000 executing query: SELECT `modSnippet`.`id` AS `modSnippet_id`, `modSnippet`.`source` AS `modSnippet_source`, `modSnippet`.`property_preprocess` AS `modSnippet_property_preprocess`, `modSnippet`.`name` AS `modSnippet_name`, `modSnippet`.`description` AS `modSnippet_description`, `modSnippet`.`editor_type` AS `modSnippet_editor_type`, `modSnippet`.`category` AS `modSnippet_category`, `modSnippet`.`cache_type` AS `modSnippet_cache_type`, `modSnippet`.`snippet` AS `modSnippet_snippet`, `modSnippet`.`locked` AS `modSnippet_locked`, `modSnippet`.`properties` AS `modSnippet_properties`, `modSnippet`.`moduleguid` AS `modSnippet_moduleguid`, `modSnippet`.`static` AS `modSnippet_static`, `modSnippet`.`static_file` AS `modSnippet_static_file`, `Source`.`id` AS `Source_id`, `Source`.`name` AS `Source_name`, `Source`.`description` AS `Source_description`, `Source`.`class_key` AS `Source_class_key`, `Source`.`properties` AS `Source_properties`, `Source`.`is_stream` AS `Source_is_stream` FROM `modx_site_snippets` AS `modSnippet` LEFT JOIN `modx_media_sources` `Source` ON `modSnippet`.`source` = `Source`.`id` WHERE `modSnippet`.`name` = ? ORDER BY `modSnippet`.`id` ASC  - Array
          (
              [0] => HY000
              [1] => 1267
              [2] => Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
          )
           
          [2015-07-23 09:12:31] (ERROR @ /index.php) `[[*1]]` is not a valid integer and may not be passed to makeUrl()


          Thank you advance,
          Tom
            • 46886
            • 1,154 Posts
            Hi Tom glad you came back!

            Ok first let's understand clearly, in the manager you are in Components>Discuss and then thread tab, is it right? I just checked it and was able to delete a thread there...but I sort of remember that before it didn't work. Pls make sure you have proper permissions, you may need admin permissions within Discuss to have the power to delete inside the manager.

            Also, you can delete not in the manager, you can get mod/admin permissions and do it on the forum side.

            So, if you have mod rights, then go into one board in the forum, and then click on the thread. Inside the thread view if you have rights you should have a dark-colored toolbar at the very bottom of your page. I think it was green in the standard template style. Its easy to not notice, I even posted here complaining how it didn't work for me and...it was working the whole time ;-)

            From there, you can delete the thread. Its not perfect because its slow, you have to click into the thread before you see your toolbar, so if you had like 5 threads in a row I don't think there is anyway to just delete them all, you may have to go into each one and delete.

            Anyway this way definitely works. In the manager I remember there is a broken looking method where a little box will pop up but nothing happens, but I just tested and did delete an old thread just now.

            Finally, any error log info?
              • 46886
              • 1,154 Posts
              Ah I didn't notice the language error, that's called collation, you may want to be careful about it as it can cause problems.

              Re-reading, it seems you can't delete in exactly the way I just did, wonder what is going on, and could the collation issue be causing this??