Menu ▾ ▴

#120 5dev37 bugs

open
nobody
5
2015-01-06
2005-02-11
No

* Setup instructions don't say to make includes/motd
write-able by www daemon.

* includes/classes/dbi.api_class.php
Function query() doesn't check if $this->link is alive
- and there are
times when it's not... added warning and return FALSE.

* modules/groups/actions/new.php is trying to insert
data into
columns that don't exist:
INSERT INTO groups
(name,short_name,address,address2,contact,tech,tao,brm,sales,amount,bought,start_date,end_date,email,notes)
VALUES('Purchase','prchs','','','','','','','','0','0','1107406800','1107406800','','Notes')
But "short_name" column is not defined -
this is a different between 4.0.4 and 5dev. Add
functionality with:
mysql> ALTER TABLE groups ADD short_name VARCHAR(8);
CHANGELOG says: "Added short_name for groups, this
allows for
a name abbreviation to be displayed instead of the full
group name. Also added
option to preferences so each user can decide if they
want the full name or the
short name to be displayed."

* Something is trying to run this query:
DELETE FROM group_products WHERE gid='13'WHERE pid='4';
but it SHOULD be:
DELETE FROM group_products WHERE gid='13' AND pid='4';
Ok, it's a bug. Replace/fix this function in file:
includes/classes/dbi.api_class.php
-------------------------------------------------------------
function delete($table,$matches)
{
$conditions = null;

if (empty($table) or count($matches) < 1) {
return;
}

//fmg: function broken b/c sql ends up of the form:
// DELETE FROM <table> WHERE a='a1' WHERE
b='b1' WHERE c='c1'...
// b/c $conditions never reset from null
$sql = "DELETE FROM {$table} ";

foreach ($matches as $field => $value) {
$sql .= is_null($conditions) ? "WHERE " : "AND ";
$sql .= "{$field}='{$value}' "; //fmg: added
space here
//fmg: reset $conditions so next time in loop
print "AND"
$conditions = TRUE;
}

$this->query($sql);
}
-------------------------------------------------------------

* there is a bug in themes/default/date-picker.js where
gMonthName
is undefined in initial calendar view (under FireFox
V1.0). The fix
is to change the function to be: (segment)
-------------------------------------------------------------
Calendar.prototype.show = function() {
var vCode = "";

this.gWinCal.document.open();
//fmg: without this I get "Undefined" for initial
month name!
this.gMonthName = Calendar.get_month(this.gMonth - 1)

// Setup the page...
this.wwrite("<html>");
-------------------------------------------------------------

* Another bug in themes/default/date-picker.js
highlights in red
date in wrong month (-1)

* Something is trying to run this query:
SELECT report_id,name,savedate FROM reports WHERE
userid='10';
But "report_id" column is not defined - this is a
different between
4.0.4 and 5dev. Add functionality with:
mysql> ALTER TABLE reports CHANGE rid report_id int(11)
auto_increment;
mysql> ALTER TABLE reports ADD savedate INTEGER NOT NULL;
* * * WARNING: this change makes going back to 4.0.4
problematic unless
you also alter it to use report_id
instead of rid * * *

* Something is trying to run this query:
SELECT fid,description,userid,uploaded_on,name,private
FROM files WHERE typeid='1'AND file_type='issues' ORDER
BY uploaded_on
But "description" column is not defined - this is a
different between
4.0.4 and 5dev. Add functionality with:
mysql> ALTER TABLE files ADD description VARCHAR(64)
DEFAULT NULL;

* If I click on "View Issue" (in header) without
entering a number, I
get a blank "modify" screen (not "enter new"). To make
it jump to
enter new (e.g., if on the phone and need quick
access), in file:
modules/issues/actions/view.php, change top of file to:
-------------------------------------------------------------
if (!isset($_ENV['api'])) {
exit;
}

//fmg: don't open blank in this case - redirect to Main
(???)
if (empty($_POST['issueid']) and empty($_GET['issueid'])) {

$_ENV['api']['sys']->redirect("?module=issues&action=new");
}
-------------------------------------------------------------
Preferably it should be a preferences option - a choice of:
1) Enter new issue
2) Show issues (main menu)
3) Refresh current screen (NOP)

* There is a bug in template modules/users/tpl/view.tpl
and the Add/Remove
from group text is in wrong place/missing. Fix it by
changing text to
read:
-------------------------------------------------------------
<!-- fmg: <td width="25%"><label for="add_groups">{t}Add to
Groups{/t}:</label></td> -->
<td width="25%"><label
for="add_groups">{t}Add to
Groups{/t}:</label>
<select name="add_groups[]"
size="10" multiple="multiple"
style="width: 100%;">
{foreach from=$groups item=group}
{if $api.perms->check("update_group",$group.gid)}
<option
value="{$group.gid}">{$group.name}</option>
{/if}
{/foreach}
</select>
</td>
<td width="25%"><label
for="del_groups">{t}Delete from
Groups{/t}:</label>
<select name="del_groups[]"
size="10" multiple="multiple"
style="width: 100%;">
{foreach from=$user_groups item=gid}
{if $api.perms->check("update_group",$gid)}
-------------------------------------------------------------

* When you click on "Forgot Password" it doesn't show
you the header.tpl:
this is a bug in this module
modules/users/actions/forgotten_password.php
Change the top of the file to be:
-------------------------------------------------------------
if (!isset($_ENV['api'])) {
exit;
}

$_ENV['api']['tpl']->display('header.tpl');
-------------------------------------------------------------

* parser script has an issue with missing "(" in if()
on line 313:
-------------------------------------------------------------
// Ok now we actually create/update the issue
if (empty($parser->args['issue'])) {
list($registered) =
$_ENV['mod']['admin']->fetch_status(TYPE_REGISTERED);

$insert['gid'] = $parser->args['group'];
$insert['status'] = $registered;
$insert['opened_by'] = empty($userid) ? _CLIENT_ :
$userid;
$insert['opened'] = $currtime;
$insert['modified'] = $currtime;
$insert['summary'] = $parser->subject;
$insert['problem'] = $parser->body;
$insert['severity'] = SEV_NORMAL;
if $parser->args['private'] == "true") { // <<<< here
$insert['private'] = "t";
}
-------------------------------------------------------------

* Personal Menu doesn't save/use (don't know why) the
"New Link URL:" - this
is the text of the link used in left-nav box:
-------------------------------------------------------------
<div class="menuitem"><a href="">Slashdot</a></div>
<div class="menuitem"><a href="">Hotmail</a></div>
-------------------------------------------------------------
yet in Preferences, it shows the URL just fine:
-------------------------------------------------------------
Text Link
Slashdot http://www.slashdot.net/
Hotmail www.hotmail.com
-------------------------------------------------------------

* Is this right? Is the "N" supposed to be followed by
a ';'?
mysql> SELECT * FROM configuration WHERE
variable='cached_data';
+-------------+-------+----------+
| variable | value | constant |
+-------------+-------+----------+
| cached_data | N; | f |
+-------------+-------+----------+

* On Preferences screen, not filling in First Name and
Last Name BUT filling in
everything else, ERASES everything else and shows error
message in red:
"Please enter your first name. Please enter your last
name."
That's not nice! Show error but preserve any filled-in
entries.

* A bunch of warnings pop up on the screen when
Advanced Search is
selected for a new user. These were undefined arrays
being tested.
Fixed in:
/var/www/html/issue-tracker2/modules/issues/actions/search.php

* When filling in a new group info, if you get the date
format wrong (doesn't
tell you what it's expecting!) the WHOLE Note: box is
erased.

* When filling in a new group info, there is NO CORRECT
answer for the
Contract Amount: field - you will ALWAYS get an error
message! Got it,
logic error in modules/groups/actions/new.php

* When filling in a new group info, the error messages
regarding DATES
is hardwired for a date format that is NOT necessarily
the same as the
one it's ACTUALLY expecting! Modified to show the
desired format from
$_SESSION['prefs']['date_format']

Discussion

  • Filip Gieszczykiewicz

     
  • Filip Gieszczykiewicz

    Logged In: YES
    user_id=37894

    Uploaded the latest snapshot (above bugs fixed), all the
    popup info's included, and also the patch file against
    5dev37 to:

    http://repairfaq.ece.drexel.edu/filipg/issue-tracker/

    Attach ZIP of patch.

     
  • Filip Gieszczykiewicz

     

Log in to post a comment.