Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1692 closed bug (fixed)

BW/forums pagination broken

Reported by: crumbking Owned by:
Priority: blocker Milestone: Legacy Resolved
Component: BW Forum Keywords: forum
Cc: planetcruiser, jsfan

Description

Pagination links does not work anymore. Only the first page is visible.

Change History (10)

comment:1 Changed 6 years ago by crumbking

I guess problems happens because of this commit:

Line 637 forums.ctrl.php

 } else if (preg_match_all('/page([0-9]+)/i', $r, $regs)) {
               //old } else if (eregi('page([0-9]+)', $r, $regs)) {

If you revert this to the old code the forum still works.

I'don't have time to check that it's valid to php and works. Maybe someone else?

comment:2 Changed 6 years ago by globetrotter_tt

  • Cc planetcruiser jsfan added; jeanyves removed
  • Priority changed from major to blocker

This is actually a blocker and calls for a hotfix.

comment:3 Changed 6 years ago by jsfan

I just checked in a hotfix. I overlooked that the matches array in eregi was one-dimensional while it is multi-dimensional in preg_match_all. This was also an issue in messages and notify.

I have to admit I haven't tested the fix because I just couldn't get a forum on my local install to paginate at all. I have about 30 posts in a forum but I don't see any pagination at all. :( So, maybe someone could test and then merge it into master?

The hotfix has id cb04b45.

Last edited 6 years ago by jsfan (previous) (diff)

comment:4 Changed 6 years ago by globetrotter_tt

I have tested it on my local installation with forum and messages. Pagination works for both. I don't know where to test notify, though :/

comment:5 Changed 6 years ago by jsfan

The code is identical between the three of them. So, your testing should do. Just check it into master. :)

Last edited 6 years ago by jsfan (previous) (diff)

comment:6 Changed 6 years ago by jsfan

I've merged it into master now. As there is no release date for 0.9, yet, we should probably use it as a hotfix.

comment:7 Changed 6 years ago by globetrotter_tt

Shouldn't a hotfix go first to master as described here: http://trac.bewelcome.org/wiki/Hotfix

comment:8 Changed 6 years ago by jsfan

Yes, it should. But as I couldn't test it, I was reluctant to put the patch there straight away. So, I put it into develop for testing and then cherry-picked it into master. :)

comment:9 Changed 6 years ago by jsfan

  • Resolution set to fixed
  • Status changed from new to closed

comment:10 Changed 6 years ago by TimLoal

  • Milestone changed from unassigned to Legacy Resolved
Note: See TracTickets for help on using tickets.