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

    it would be great if anyone here can help out with a really weird problem concerning discuss; The 'url' placeholder in the thread paginations generates a url with the correct page query but the url itself is the same like in the board pagination, have tried many things so far but no idea whats going on. It's a migration from an smf board wrapped in a theme with minifyfx as compressor for js and css, everything is in place and working but eventually this plays a role regarding the url problem. If needed i can send further infos per pm.

    This question has been answered by onx1764. See the first response.

      • 46886
      • 1,154 Posts
      I try to support Discuss, let me try to help. You can find the right tpl and change it, but it might be a bit tricky. We also might need to figure out how Discuss makes that pagination.

      Here is a pic, is this the pagination with the problem? In a subforum?

      In my forum, the url is coming up as forums/board/65/?page=3 (assuming i have the right pagination). What is your's coming up as?

      I found this in one tpl, but only trial and error can tell us if this is the right one:

      core/components/discuss/themes/default/pages/thread/index.tpl

          	<ul class="dis-list h-group">
                  [[+posts]]
              </ul>
              [[+pagination:notempty=`
              <div class="paginate stand-alone bottom horiz-list">[[+pagination]]</div>`]]
      [ed. note: nuan88 last edited this post 8 years ago.]
        • 52099
        • 3 Posts
        Quote from: nuan88 at Apr 09, 2016, 08:17 AM
        (assuming i have the right pagination). What is your's coming up as?

        Problem occurs within the thread related pagination on the right side of thread-titles if more pages exist.

        Quote from: nuan88 at Apr 09, 2016, 08:17 AM
        I found this in one tpl, but only trial and error can tell us if this is the right one:

        core/components/discuss/themes/default/pages/thread/index.tpl

        /core/components/discuss/themes/default/chunks/pagination/thread/paginationlink.chunk.tpl
        <li><span title="[[+text]]" data-link="[[+url]]">[[+text]]</span></li>

        'url' should generate this: <span title="1" data-link="https://forums.modx.com/thread/99762/no-login-fields-visible?page=1">1</span>
        but generate that: <span title="1" data-link=""https://forums.modx.com/board=27?page=1">1</span>

        Exchanged 'url' with other thread placeholders and get always the right values in the data-link for every single thread, even the page querys are correct but not the url. To me it looks like a placeholder/geturl/makeurl problem but could also be a caching problem inside Discuss. [ed. note: onx1764 last edited this post 8 years ago.]
          • 46886
          • 1,154 Posts
          Ok here is my thinking, you are much more of a developer than I am so pls take it with a grain of salt. One thing I want to point out is that the tpl I found might not be the right one, there is a lot of tpls there. I think you definitely need to find the right tpl.

          If you have made any changes to the tpl previously, then that could be the problem, but it seems that you haven't, although I am wondering about the "no-login-fields-visible" in the url.

          My suggestion is that you may need to make a custom snippet here, otherwise i don't know how we can force makeURL do the right thing. I can't see how it could be caching when its making a URL for a board rather than a thread. Unless the tpl has been modified, then that might fix the problem.

          What seems to strange to me is that this part of the code (again, assuming this tpl is the right one or looks like the right one):

          <ul class="dis-list h-group">
          [[+posts]]
          </ul>

          Must not exist, as it would be [[+threads]] at the board level.
            • 46886
            • 1,154 Posts
            One last point, it might not be important. Discuss uses some system to build a page by getting one tpl after another. I personally was never able to find where this was decided, there must be code saying go get tpl_34 then tpl_58...

            It almost seems like you are grabbing the wrong tpl on this page, otherwise how are we getting a board url rather than a thread url...

            Just trying to think about the problem from every angle.
            • discuss.answer
              • 52099
              • 3 Posts
              Quote from: nuan88 at Apr 12, 2016, 03:51 AM
              My suggestion is that you may need to make a custom snippet here, otherwise i don't know how we can force makeURL do the right thing.
              Well, omitted that Discuss runs at version 1.2.2(dev). Problem is fixed by using the build.php snippet from version 1.2-pl which can be found here: /core/components/discuss/hooks/pagination/build.php. If anyone uses the version too and something goes wrong it might be a good guess to compare code with older versions. Could be done directly on github: https://github.com/modxcms/Discuss/tree/develop

              Anyone here knows wether the devs are still working on Discuss / pull request / bug report make sense in this case?
                • 46886
                • 1,154 Posts
                Ok great you found a solution. No, unfortunately no further development is happening on Discuss.

                There is a Discuss2 written as I understand by The Dunnock a couple years ago, but due to the LLC's resources being maxed out, the alpha version was released to the community. Since then, no progress so far, although I am hopeful.

                https://forums.modx.com/thread/96666/discuss-2-releasing-a-new-native-forum-solution-for-revo