We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37099
    • 338 Posts
    Has anyone got Discuss 1.2 working recently?

    I'm trying without success.

    I'm doing it on modxcloud.com using MODX Rev 2.2.11

    One thing I changed: in System > Namespace, the setting for Assets Path for discuss was:

    /Applications/MAMP/htdocs/modxprojects/Discuss/assets/components/discuss/

    I chaged it to: {assets_path}components/discuss/

    I can get the initial page with the example "Discuss 101" board, but when I click it it just goes to my error page.

    No error shows in the error log for this action.

    I do, however, get an error when I first load the page:

    (ERROR @ /paas/c2668/www/core/cache/includes/elements/modsnippet/31.include.cache.php : 39[line 6 below]) PHP warning: in_array() expects parameter 2 to be array, string given

    Which appears to be something to do with Formit:

    $output = ' ';
    if ($input == $options) {
        $output = ' checked="checked"';
    }
    $input = $modx->fromJSON($input);
    if (in_array($options,$input)) {
      $output = ' checked="checked"';
    }
    return $output;
    }
    


    Which I wouldn't have thought would disabled the board's links?

    I thought it might be something to do with the nginx rewrite rules.


    If I rewrite
    http://mysiteblah.biz/forums/board/1/discuss-101
    by hand in the address bar to
    http://mysiteblah.biz/index.php?q=forums/&action=board&board=1

    Then I get the page, which suggested to me that the rewrite rule wasn't working.

    But then if I click on 'Welcome' in the breadcrumb link: http://sitereport.biz/forums/?category=1
    That works which suggests the rewrite rules are working.

    Any help or pointers appreciated.

    Thanks
    Mike
























      • 46886
      • 1,154 Posts
      Hi Mike I made a user account and that went fine. Some of those resources use your normal template by the way. However I am not given the option to post a new message, nor can I see my user profile.

      First thing is turn debugging on in the options for discuss, that will be in system settings --> discuss, and as I remember its like the first or second option. That will help.

      I don't have a simple answer for you right now. I am in just about the same place on my new site, www.rayxilawforums.com/forums, except when I click on the one topic I just get my front page. So you are doing better than me haha!

      Let's keep in mind this is supposed to be dummy info. That might be part of the problem. If I could have made a new post it would have been useful. Can you make a new post as admin?

      For now, experiment and use that debugging info, at least you are throwing errors which can help. As I get my site set up, I should be able to provide some guidance.

      Andrew

        • 37099
        • 338 Posts
        Hi Andrew,

        Thanks for your response, it's good to know other people are trying to get it to work too.

        I plan to come back and have another look at this in a few weeks, i'm too busy at the moment. I have noticed some mention of Discuss 2 on twitter, which version are you trying?

        Mike
          • 46886
          • 1,154 Posts
          Hi Mike:

          Ok, come back when you can, I will be here. I have been gearing up for months on this project, so it will happen in these next weeks, by hook or by crook! smiley

          By the way I think I found the trouble, mine is now doing the same thing (once I logged in, my hooks for the login snippet aren't right yet). Also, there isn't supposed to be a "New Post" button on the front page anyway, only inside a thread.

          Here is the thread: http://forums.modx.com/thread/83194/moved-to-root-and-now-discuss-doesn-t-load#dis-post-458961

          The symptoms are the same at least, just re-directs to the front page. You do get an error though...anyway I will be checking the htaccess file...

          I will try to make a simple primer on getting things going. I like to do that, its helpful for me to organize and store my thoughts, and maybe for others too.

          I am just going with the regular discuss module, and I analyzed with friends and found this is probably the right way to go. The learning curve, unfortunately, is steep, but the promised land beckons just ahead...or so I hope! ;-)

          Andrew
            • 46254
            • 2 Posts
            I am having more or less the same problem... I have successfully configured the "Login" extra and installed Formit... And I have gone through the Discuss installation tutorial found in the docs. I get the demo home page to come up, but that's it. If I click any of the links on the page I get my website's error page. Maybe there's something else I need to do to get this working? Grr... I'm about to give up on this.

            If anyone has any idea what I'm doing wrong or how to fix this, help would be appreciated.

            Thanks,
            -Tyler
              • 46254
              • 2 Posts
              Well... Ok then! Within seconds of posting I figured out the problem. I'm posting my findings in case anyone else gets stuck on this.

              First of all, anyone using Discuss will definitely want to read this installation guide. If you don't follow the configuration instructions here, it simply won't work.

              http://rtfm.modx.com/extras/revo/discuss/discuss.installation

              I missed one step in the guide, just one step, and that's what messed me up:

              Make sure to add this BEFORE the regular MODX rewrite rules in your .htaccess but AFTER the RewriteBase. If you have used a different alias than "forums" in your Discuss resource, or the forums are in the root of the site, make sure to replace all occurences of "forums" below accordingly.
              # If imported from SMF, you can include the following lines to make sure existing urls don't break.
              RewriteRule ^forums/index.php/topic,(.*).msg(.*).html$ forums/?action=thread&thread=$1&i=1
              RewriteRule ^forums/index.php/topic,(.*).(.*).html$ forums/?action=thread&thread=$1&i=1&start=$2
              RewriteRule ^forums/\?topic=(.+).(.+)$ forums/?action=thread&thread=$1&i=1
              RewriteRule ^forums/index.php/board,(.*).(.*).html$ forums/?action=board&board=$1&i=1&start=$2
              RewriteRule ^forums/\?board=(.+).(.+)$ forums/?action=board&board=$1&i=1
               
               
              # Discuss rewrite rules
              RewriteRule ^forums/thread/([0-9]+)/(.*)$ forums/?action=thread&thread=$1 [L,QSA]
              RewriteRule ^forums/u/(.+)$ forums/?action=user&user=$1 [L,QSA]
              RewriteRule ^forums/board/([0-9]+)/(.*)$ forums/?action=board&board=$1 [L,QSA]
              RewriteRule ^forums/category/([0-9]+)/(.*)$ forums/?category=$1 [L,QSA]
              RewriteRule ^forums/(.+)$ forums/?action=$1 [L,QSA]
              RewriteRule ^forums/(.+)/$ forums/?action=$1 [L,QSA]


              The first set of rewrite rules I am not using. They pertain to importing from the SMF forum, which I am not doing. I just copied and pasted the part below "Discuss rewrite rules."

              Maybe this will help someone.

              Cheers,
              Tyler
              • Mark Hamstra Reply #7, 10 years ago
                From the first post:

                If I rewrite
                http://mysiteblah.biz/forums/board/1/discuss-101
                by hand in the address bar to
                http://mysiteblah.biz/index.php?q=forums/&action=board&board=1

                Then I get the page, which suggested to me that the rewrite rule wasn't working.

                But then if I click on 'Welcome' in the breadcrumb link: http://sitereport.biz/forums/?category=1
                That works which suggests the rewrite rules are working.

                Actually, the url "/forums/?category=1" doesn't rely on any rewrites other than your core MODX ones (/forums/ is your resource with the Discuss call). The /forums/board/1/discuss-101 does rely on the Discuss rewrite rules because it has to transform it to index.php?q=forums/&action=board&board=1

                So, as Tyler says, follow the installation guide closely and be sure that the custom rewrite rules are in place wink
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 46886
                  • 1,154 Posts
                  Hey Tyler:

                  Within seconds of posting I figured out the problem.

                  Funny because this happens to me all the time.

                  I just want to comment that I put the re-write rules in the forums here: http://forums.modx.com/thread/89865/getting-started-htaccess-w-code

                  And they should be perfect because AMDbuilder improved them for me. So you may want to use that. And I have a couple little things recently on this board that may be helpful (well, really just that the bbcode java isn't included, so the buttons in the reply window don't work without putting in that code, which is widely available online).

                  Will be interested to see your next steps.
                    • 37099
                    • 338 Posts
                    OK, better late than never.

                    I tried again and succeeded this time, twice smiley


                    1. Using version 1.2-pl on MODX Cloud with Revo 2.3
                    2. Using version 1.2-pl on a cPanel host with Revo 2.3

                    I don't know what I did differently.

                    And it's good to see that Andrew was successful too:

                    https://www.rayxilawforums.com/forums/

                    Shows it is possible!

                    So I now need to start exploring and working out how to change the templates....

                    Mike
                      • 46886
                      • 1,154 Posts
                      Hey you made it back! Yeah, things are better than before, actually I just realized that from a strictly tech perspective things are really pretty good. I am able to do all the basic stuff I wanted to do. Somehow, the hump was overcome.

                      However changing the templates is tricky, I avoided trouble by only modifying the original template, when people try to shoe-horn the discuss into their own templates it seems to not work well, there have been lots of weird problems.