Moodle

Forum mod cleanup II

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.2
  • Component/s: Forum
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Various forum related problem to be fixed in 1.9.1

  1. forum_meta_dbg1.patch
    14/Apr/08 3:25 PM
    0.8 kB
    Petr Škoda (skodak)
  2. forum_tracking27.patch
    11/Apr/08 7:09 PM
    119 kB
    Petr Škoda (skodak)
  1. forum_tracking_options.png
    8 kB
    14/Apr/08 5:35 PM

Issue Links

Progress
Resolved Sub-Tasks

Sub-Tasks

Activity

Hide
Petr Škoda (skodak) added a comment -

sending a patch for review/testing

Show
Petr Škoda (skodak) added a comment - sending a patch for review/testing
Hide
Petr Škoda (skodak) added a comment -

8., 14. are not fixed yet in patch and there might be some fixes not mentioned above

Show
Petr Škoda (skodak) added a comment - 8., 14. are not fixed yet in patch and there might be some fixes not mentioned above
Hide
Dan Poltawski added a comment -

Have tried to review code. Looks good.

Found one minor thing in forum_get_tracking_link() you are using the wrong strings for linktext, I think it should be:

if (forum_tp_is_tracked($forum)) { $linktitle = $strnotrackforum; $linktext = $strnotrackforum; } else { $linktitle = $strtrackforum; $linktext = $strtrackforum; }

Show
Dan Poltawski added a comment - Have tried to review code. Looks good. Found one minor thing in forum_get_tracking_link() you are using the wrong strings for linktext, I think it should be: if (forum_tp_is_tracked($forum)) { $linktitle = $strnotrackforum; $linktext = $strnotrackforum; } else { $linktitle = $strtrackforum; $linktext = $strtrackforum; }
Hide
Dan Poltawski added a comment -

Hmm, found an issue with front page site news.

Before patch: Most recent site news post displayed
After patch: All site news posts displayed

Show
Dan Poltawski added a comment - Hmm, found an issue with front page site news. Before patch: Most recent site news post displayed After patch: All site news posts displayed
Hide
Petr Škoda (skodak) added a comment -

Could you be please more specific about the frontpage problem? What should I look for exactly?

Show
Petr Škoda (skodak) added a comment - Could you be please more specific about the frontpage problem? What should I look for exactly?
Hide
Dan Poltawski added a comment -

Sorry, in the front page settings:

Front page items when logged in is set to 'News items' (as the only option)
News items to show is set to 1

Now on the front page 1 news item is displayed. When I switch to the new patch, all the news items are displayed.

Show
Dan Poltawski added a comment - Sorry, in the front page settings: Front page items when logged in is set to 'News items' (as the only option) News items to show is set to 1 Now on the front page 1 news item is displayed. When I switch to the new patch, all the news items are displayed.
Hide
Petr Škoda (skodak) added a comment -

thanks, testing new patch

Show
Petr Škoda (skodak) added a comment - thanks, testing new patch
Hide
Petr Škoda (skodak) added a comment -

the new count on course page should be fixed now

Show
Petr Škoda (skodak) added a comment - the new count on course page should be fixed now
Hide
Petr Škoda (skodak) added a comment -

Dan, the following code was not cahnged by the patch, not sure what is correct:
if (forum_tp_is_tracked($forum)) { $linktitle = $strnotrackforum; $linktext = $strnotrackforum; } else { $linktitle = $strtrackforum; $linktext = $strtrackforum; }

Show
Petr Škoda (skodak) added a comment - Dan, the following code was not cahnged by the patch, not sure what is correct: if (forum_tp_is_tracked($forum)) { $linktitle = $strnotrackforum; $linktext = $strnotrackforum; } else { $linktitle = $strtrackforum; $linktext = $strtrackforum; }
Hide
Ryan Smith added a comment -

I just updated from CVS on MOODLE_19_STABLE on my test site and now I can't get to any forums. After updating I visited moodle/admin and it did prompt to update the forum activity. When I try to visit a forum page, such as:

../moodle/mod/forum/index.php?id=920

I get a white screen, no output. The following errors are in my Apache error.log:

[Mon Apr 14 00:58:18 2008] [error] [client 137.112.60.250] PHP Catchable fatal error: Object of class object could not be converted to string in C:\\Apache2\\htdocs\\moodle\\lib
dmllib.php on line 2160, referer: /moodle/course/view.php?id=920

[Mon Apr 14 00:58:20 2008] [error] [client 137.112.60.250] PHP Warning: Illegal offset type in isset or empty in C:\\Apache2\\htdocs\\moodle\\lib
accesslib.php on line 2561, referer: /moodle/course/view.php?id=920

[Mon Apr 14 00:58:20 2008] [error] [client 137.112.60.250] PHP Catchable fatal error: Object of class object could not be converted to string in C:\\Apache2\\htdocs\\moodle\\lib
dmllib.php on line 2160, referer: /moodle/course/view.php?id=920

Show
Ryan Smith added a comment - I just updated from CVS on MOODLE_19_STABLE on my test site and now I can't get to any forums. After updating I visited moodle/admin and it did prompt to update the forum activity. When I try to visit a forum page, such as: ../moodle/mod/forum/index.php?id=920 I get a white screen, no output. The following errors are in my Apache error.log: [Mon Apr 14 00:58:18 2008] [error] [client 137.112.60.250] PHP Catchable fatal error: Object of class object could not be converted to string in C:\\Apache2\\htdocs\\moodle\\lib
dmllib.php on line 2160, referer: /moodle/course/view.php?id=920 [Mon Apr 14 00:58:20 2008] [error] [client 137.112.60.250] PHP Warning: Illegal offset type in isset or empty in C:\\Apache2\\htdocs\\moodle\\lib
accesslib.php on line 2561, referer: /moodle/course/view.php?id=920 [Mon Apr 14 00:58:20 2008] [error] [client 137.112.60.250] PHP Catchable fatal error: Object of class object could not be converted to string in C:\\Apache2\\htdocs\\moodle\\lib
dmllib.php on line 2160, referer: /moodle/course/view.php?id=920
Hide
Petr Škoda (skodak) added a comment -

Hi Ryan,

thanks for the report! Could you please apply the patch, it should show the backtrace of the problem, I can not reproduce it myself.

Show
Petr Škoda (skodak) added a comment - Hi Ryan, thanks for the report! Could you please apply the patch, it should show the backtrace of the problem, I can not reproduce it myself.
Hide
Petr Škoda (skodak) added a comment -

sending patched file too...

Show
Petr Škoda (skodak) added a comment - sending patched file too...
Hide
Petr Škoda (skodak) added a comment -

BTW Ryan, do you have any PHP accelerator installed?

Show
Petr Škoda (skodak) added a comment - BTW Ryan, do you have any PHP accelerator installed?
Hide
Petr Škoda (skodak) added a comment -

Ryan, the regression is fixed, please test latest cvs

Show
Petr Škoda (skodak) added a comment - Ryan, the regression is fixed, please test latest cvs
Hide
Dan Poltawski added a comment -

Attaching screenshot of the forum tracking screen which I hope explains the issue lang strings problem further

The tooltip has the correct text, the link text is incorrect.

Show
Dan Poltawski added a comment - Attaching screenshot of the forum tracking screen which I hope explains the issue lang strings problem further The tooltip has the correct text, the link text is incorrect.
Hide
Dan Poltawski added a comment -

That is of course of the forum list of posts screen.

Show
Dan Poltawski added a comment - That is of course of the forum list of posts screen.
Hide
Petr Škoda (skodak) added a comment - - edited

the like text shows current status and the tool tip says what will happen if you click - I did not invent this, we will have to ask MD

Show
Petr Škoda (skodak) added a comment - - edited the like text shows current status and the tool tip says what will happen if you click - I did not invent this, we will have to ask MD
Hide
Ryan Smith added a comment -

I am using eAccelerator.

I just did a CVS update and got the following new files
mod/forum/lib.php
mod/forum/search.php
mod/forum/view.php

I can now access the forums again.

Thanks for fixing it quickly!

Show
Ryan Smith added a comment - I am using eAccelerator. I just did a CVS update and got the following new files mod/forum/lib.php mod/forum/search.php mod/forum/view.php I can now access the forums again. Thanks for fixing it quickly!
Hide
Eloy Lafuente (stronk7) added a comment - - edited

Offtopic comment:

Agreeing 100% about this sort of META bugs (with nice atomic subtasks grouped nicely), it's really a pain to check/understand/verify/close any of those subtasks if all them are committed together.

So I would suggest to perform also atomic commits, each one fixing one subtask (or at least, the minimum number of subtask possible if strongly connected).

That way everything will be easier (but for the developer, I know).

Just one personal proposal... to have everything really atomized and understandable. Ciao

Show
Eloy Lafuente (stronk7) added a comment - - edited Offtopic comment: Agreeing 100% about this sort of META bugs (with nice atomic subtasks grouped nicely), it's really a pain to check/understand/verify/close any of those subtasks if all them are committed together. So I would suggest to perform also atomic commits, each one fixing one subtask (or at least, the minimum number of subtask possible if strongly connected). That way everything will be easier (but for the developer, I know). Just one personal proposal... to have everything really atomized and understandable. Ciao
Hide
Petr Škoda (skodak) added a comment -

Sorry Eloy, I prefer atomic commits too, this one went through several rounds of refactoring and I worked on this for 3 weeks

Show
Petr Škoda (skodak) added a comment - Sorry Eloy, I prefer atomic commits too, this one went through several rounds of refactoring and I worked on this for 3 weeks
Hide
Dan Poltawski added a comment -

Think i've found a regression in forum_user_outline()

forum_count_user_posts() is returning an array of objects:

Array
(
[0] => stdClass Object
(
[lastpost] =>
[postcount] => 0
)

)

And forum_user_outline() is assuming just an objet is returned. Visible in activity outline report

Show
Dan Poltawski added a comment - Think i've found a regression in forum_user_outline() forum_count_user_posts() is returning an array of objects: Array ( [0] => stdClass Object ( [lastpost] => [postcount] => 0 ) ) And forum_user_outline() is assuming just an objet is returned. Visible in activity outline report
Hide
Petr Škoda (skodak) added a comment -

thanks Dan, should be fixed

Show
Petr Škoda (skodak) added a comment - thanks Dan, should be fixed
Hide
Petr Škoda (skodak) added a comment -

closing, thanks everybody

Show
Petr Škoda (skodak) added a comment - closing, thanks everybody

Dates

  • Created:
    Updated:
    Resolved: