We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18608
    • 112 Posts
    Has anyone gotten Discuss to work on modx cloud/nginx yet?

    I'm testing a install right now, and I can get everything to work except creating new post (which is an important part of a forum smiley ). Now i'm just wondering if i'm the only one having an issue with this or it's an bug in discuss?
      Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
      • 22840
      • 1,572 Posts
      I had that issue on my own server so not sure if it's the same but it was because Formit wasn't installed

      http://forums.modx.com/thread/81390/2-errors-on-clean-install#dis-post-448991
        • 18608
        • 112 Posts
        Thank you for your reply. That isn't the case here - I had Formit installed all the time...
          Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
          • 38878
          • 255 Posts
          I am having the same issue. I did see a cloud fork by Jay Gilmore on Github, but not sure what the status or plans for that are. Templating atm is a bear. I have posted a bug on the posting issue at http://tracker.modx.com/issues/9518. I didn't see a previous related bug, but maybe I just missed it. Better safe than sorry.

          Quote from: MathiasD at Jan 24, 2013, 12:53 PM
          Has anyone gotten Discuss to work on modx cloud/nginx yet?

          I'm testing a install right now, and I can get everything to work except creating new post (which is an important part of a forum smiley ). Now i'm just wondering if i'm the only one having an issue with this or it's an bug in discuss?
            • 3749
            • 24,544 Posts
            I couldn't get Discuss to work on Cloud, but I didn't spend a lot of time trying. I ended up using just Quip, which I also couldn't get to work until I turned off threading.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 41155
              • 13 Posts
              I just installed it on Cloud and it seems to work (added an new board, wrote some posts...). If somebody is interested, send me your Cloud-Account-Name. I will send it into your Cloud.
                Weitblick Internetwerkstatt, Germany
                www.weitblick.net
                • 18608
                • 112 Posts
                Quote from: erhard at Feb 22, 2013, 05:20 PM
                I just installed it on Cloud and it seems to work (added an new board, wrote some posts...). If somebody is interested, send me your Cloud-Account-Name. I will send it into your Cloud.
                Could you tell what changes you made to make it work?
                  Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
                  • 41155
                  • 13 Posts
                  almost nothing. There are only three things to make it working basicly after installing the packages:


                  1. activate friendly_urls and insert the nigx rewrite rules above the other rules
                  2. enter the resource-id of the resource "forums" in system settings "discuss.forums_resource_id" (normaly it is "2" in a plain installation)
                  3. create a login-resource with the following code and enter in system settings "discuss.login_resource_id" the id of it.

                  After that, you can login with your admin-user, open the demo-thread, write new posts and so on. But register is not possible. For this you have to setup register-resources. Since my last post, I made some progress and till now, everything works pretty good. I'm very glad about Discuss.

                  login-resource:
                  [[!Login?
                      &preHooks =`preHook.DiscussLogin`
                      &postHooks=`postHook.DiscussLogin`
                  ]]


                  nigx-rewrite-rules:
                  rewrite ^/forums/thread/([0-9]+)/(.*)$ /index.php?q=forums/&action=thread&thread=$1 last;
                  rewrite ^/forums/u/(.+)$ /index.php?q=forums/&action=user&user=$1 last;
                  rewrite ^/forums/board/([0-9]+)/(.*)$ /index.php?q=forums/&action=board&board=$1 last;
                  rewrite ^/forums/category/([0-9]+)/(.*)$ /index.php?q=forums/&category=$1 last;
                  rewrite ^/forums/(.+)$ /index.php?q=forums/&action=$1 last;
                  rewrite ^/forums/(.+)/$ /index.php?q=forums/&action=$1 last;


                  I can send you my Cloud via "Send Cloud" if you are interested.

                  Erhard
                    Weitblick Internetwerkstatt, Germany
                    www.weitblick.net
                    • 38878
                    • 255 Posts
                    Interesting. I got it working by creating a new login resource with just the pre and post hooks and it works. I guess reusing an existing login resource is no good atm.

                    Also am seeing this js error in the console in shcore.js:
                    Uncaught TypeError: String.prototype.replace called on null or undefined 


                    So far I can't see an issue other than the console reporting this error which appears to be b/c thew syntax highlighter is being called twice in the same frame but I haven't really banged on it much since I just got posting working. Looked for any updates to the shcore.js but it is the latest so no easy fix there.

                    Thanks Erhard for the sample code.
                    [ed. note: harveyev last edited this post 11 years, 2 months ago.]