View Issue Details

IDProjectCategoryView StatusLast Update
0008103mantisbtbugtrackerpublic2007-08-02 02:28
Reporterlibregeek Assigned Togiallu  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a2 
Fixed in Version1.1.0a4 
Summary0008103: Cannot modify the bugnote order.
Description

Tied to change the sort order of bugnotes to descending in config_inc.php with the following setup:
$g_bugnote_order = DESC;
But it doesn't work for any of the users.

TagsNo tags attached.
Attached Files
mantis-query-error.jpg (48,387 bytes)   
mantis-query-error.jpg (48,387 bytes)   

Relationships

has duplicate 0005591 closedgiallu Bugnotes order broken after upgrade from 0.18.3 to 0.19.2 
has duplicate 0007948 closedgiallu Changes in $g_bugnote_order or $g_default_bugnote_order doesn't works 

Activities

giallu

giallu

2007-06-29 19:13

reporter   ~0014840

Could this problem be related to 0007948 and/or 0005591 ?

libregeek

libregeek

2007-07-02 07:28

reporter   ~0014843

I tried the suggestion in
http://www.mantisbt.org/bugs/view.php?id=7948,
Nothing happened for old users, for old users I got a query failed error.

giallu

giallu

2007-07-02 10:04

reporter   ~0014845

I am not 100% sure how to proceed for debugging this; probably you could try to enable query tracking and report here exactly WHICH one is failing. Please add to your config_inc.php the lines:

$g_show_queries_list = ON;
$g_show_detailed_errors = ON;
$g_display_errors = array(
E_WARNING => 'halt',
E_NOTICE => 'halt',
E_USER_ERROR => 'halt',
E_USER_WARNING => 'halt',
E_USER_NOTICE => 'halt'
);

and report here the error(s) you see.

libregeek

libregeek

2007-07-13 08:11

reporter   ~0014958

Here is the errors I got after enabling debugging:

Database query failed. Error received from database was 0001064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '102' at line 4 for the query: SELECT *
FROM mantis_bugnote_table
WHERE bug_id='1'
ORDER BY date_submitted 102

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Full path: /var/www/html/mantis/core/database_api.php
Line: 128
The query traceback screenshot is attached.

giallu

giallu

2007-07-13 10:30

reporter   ~0014959

ahhh wait.

Your setting:

$g_bugnote_order = DESC;

is not right. it should be:

$g_bugnote_order = 'DESC';

libregeek

libregeek

2007-07-13 10:39

reporter   ~0014960

I tried the following settings
$g_default_bugnote_order = 'DESC';

$g_bugnote_order = 'DESC';

But same error.

giallu

giallu

2007-07-13 11:29

reporter   ~0014961

Ok. please test this;

  1. set:

    $g_default_bugnote_order = 'DESC';
    $g_bugnote_order = 'DESC';

  2. create a new user

  3. login with this new user and verify if you still get errors.

libregeek

libregeek

2007-07-16 05:42

reporter   ~0015038

It worked for new users. But for the old users the sort order remains the same. However there are no errors. Thanks for guiding me.

giallu

giallu

2007-07-16 06:50

reporter   ~0015040

Ok. so I know where the "problem" in the code is...

About your other users, tell them to try going in "My Account", then "Preferences" and change their "Notes Sort Order" there.

libregeek

libregeek

2007-07-16 07:35

reporter   ~0015042

I have already intimated them. Thanks.

giallu

giallu

2007-07-21 18:59

reporter   ~0015152

Ok. I commited a change that will hopefully avoid other issues like this.
In case it was not clear, the problem is that DESC was also a constant defined in constants_inc.php, so that, though we expect a string to be used for the default bugnote order, no error was reported.