Monday, 2009-05-18

../irclogs/#mantishelp.2009-05-18.log
--- scribe started ---00:00
dhx_mhey03:32
dhx_mlol @ wiki_enabled() function03:33
dhx_mis anyone using git trunk able to try disabling a user account via manage_user_update.php?04:18
dhx_mI receive:04:18
dhx_mAPPLICATION ERROR #40104:18
dhx_mDatabase query failed. Error received from database was #1054: Unknown column 'duplicate_realname' in 'field list' for the query: UPDATE mantis_user_table04:18
dhx_mSET duplicate_realname=?04:18
dhx_mWHERE id=?.04:18
dhx_mbtw this isn't the latest git trunk... but one from a few weeks ago... I don't think anything has changed since to fix it04:19
[KK]Kirilldhx_m: morning04:24
dhx_mhey04:25
[KK]KirillWhere are you get 401 error?04:25
dhx_mwhen logged in as an administrator04:25
dhx_mupdating a user account04:26
[KK]Kirilladministrator?04:26
dhx_m(ie. clicking the "enabled" checkbox)04:26
[KK]Kirill*rofl*04:26
dhx_mManage => Manage Users04:26
[KK]Kirillwhich user change enable?04:26
dhx_mpick any at random04:26
dhx_m(well... in your test installation :p)04:27
[KK]Kirillno.. I haven't this error04:27
dhx_mI find that you don't even need to change anything04:27
dhx_mhmm04:27
dhx_mare you using a late version of mantis?04:27
[KK]Kirillyes04:27
dhx_mok I'll investigate :)04:27
[KK]Kirillbut 2 weeks ago I have last git too04:27
dhx_mthanks04:27
[KK]Kirillbut nothing04:27
[KK]Kirillcheck your test installation, or create new and try04:28
dhx_myeah I was experiencing this problem with a heavily customised live installation04:30
dhx_mwell actually... it is available at http://git.mantisforge.org/w/mantisbt/dhx.git?a=shortlog;h=refs/heads/fyp04:30
dhx_mgit trunk from about a month ago plus some branches I've been working on merged in too04:31
dhx_mhmmm a grand total of 3 matches for duplicate_realname in latest master04:35
dhx_malso the same 3 matches in my 'fyp' branch from a month ago04:37
dhx_mhmm04:37
dhx_mduplicate_realname is not even a column in the schema!04:44
dhx_mI'm confused now04:44
dhx_mlooks like voodoo magic territory to me... there is:04:49
dhx_m/**04:49
dhx_m * leave off for now04:49
dhx_m * @global int $g_differentiate_duplicates04:49
dhx_m */04:49
dhx_m$g_differentiate_duplicates = OFF;04:49
dhx_mthat sort of configuration setting is a big red warning sign that you're entering "magic code" functions :p04:50
[KK]Kirillok.. I go work. At work I look it05:05
dhx_mno real problem... just thought it was a very odd error message to see when the db schema doesn't have the column...05:07
dhx_m:)05:07
dhx_mcya05:07
[KK]Kirilldhx_m: I try get your copy of mantisbt-source from git05:41
dhx_myep let me try a vanilla copy of git master05:43
dhx_m(without my config)05:43
[KK]Kirilldhx_m: what branch use? master?05:49
dhx_mep05:49
dhx_myeah05:50
dhx_mI suspect it might only occur under certain config...?05:50
dhx_mnot too sure though05:50
[KK]Kirillpost your config without db and email settings to http://pastebin.mantisbt.org05:51
[KK]Kirillsorry, http://pastebin.mozilla.org/05:52
[KK]Kirillfor default config I haven't error05:57
dhx_mok 1sec I'll see what I can do05:58
dhx_mhmm can't reproduce again on another install I have06:00
dhx_mfunction user_get_name( $p_user_id ) {06:09
dhx_m$row = user_cache_row( $p_user_id, false );06:09
dhx_mif( false == $row ) {06:09
dhx_mreturn lang_get( 'prefix_for_deleted_users' ) . (int) $p_user_id;06:09
dhx_m} else {06:09
dhx_mif( ON == config_get( 'show_realname' ) ) {06:09
dhx_mif( is_blank( $row['realname'] ) ) {06:09
dhx_mreturn $row['username'];06:09
dhx_m} else {06:09
dhx_mif( isset( $row['duplicate_realname'] ) && ( ON == $row['duplicate_realname'] ) ) {06:09
dhx_mthere is reference to what appears to be a 'duplicate_realname' column... although maybe this is just updated in cache06:10
dhx_mrather than being stored in the db?06:10
[KK]Kirillmay be06:12
dhx_muser_is_realname_unique() seems to run a query to check if a real name is unique06:13
dhx_mif not, it'll user_set_field(userid, 'duplicate_realname', ON)06:13
[KK]Kirillmay be you use old db scheme but source new?06:21
dhx_myeah but the new source doesn't have any mention of the duplicate_realname column06:22
dhx_mwhich leads me to be believe this is a 'fake' column used internally within mantis06:22
dhx_mand somewhere... Mantis is going through the internal user array and trying to find those same columns in the db table06:23
dhx_maha06:24
dhx_mif I comment out the lines:06:24
dhx_m#       user_ensure_realname_valid( $f_realname );06:24
dhx_m#       user_ensure_realname_unique( $f_username, $f_realname );06:24
dhx_mfrom within manage_user_update.php - the problem is fixed06:24
dhx_mmore specifically the user_ensure_realname_unique call is failing06:25
dhx_meven though all my users have unique usernames and real names06:26
gialluhi all06:26
dhx_maha06:26
dhx_mfound the bug!06:26
[KK]Kirillgiallu: Hi06:27
dhx_m[KK]Kirill: set a user's real name to two words, with a space in the middle06:27
dhx_mthen go back and try to update it (maintaining the use of two words)06:27
dhx_mit will fail with that weird SQL error06:27
dhx_mwhy the error is an SQL message is beyond me... when no SQL is involved at all...06:27
dhx_mgiallu: hi06:27
dhx_mI can reproduce on paul's date3 branch as well06:28
[KK]Kirilldhx_m: I can't reproduce this. can you post your config?06:29
dhx_mhave you tried changing the real name of a user to "A B"06:30
dhx_mthen going back and updating that real name to be "C D"?06:30
dhx_m(using the administration Manage => Manage Users screen)06:30
[KK]Kirillsorry, nothing06:31
[KK]Kirillmay be wink?06:32
dhx_mare you using mysql?06:32
[KK]Kirillhttp://www.debugmode.com/wink/06:32
[KK]Kirillyes06:32
dhx_myeah I'm checking code now06:32
dhx_mto work out which line of code is the problem06:32
dhx_moh06:36
dhx_mthe problem is user_set_field06:38
dhx_mthat is where the error is generated... as it tries to update the duplicate_realname column06:38
dhx_mthat doesn't exist in the schema06:38
[KK]Kirilldhx_m: What's lines?06:38
dhx_muser_api.php:1209 for user_set_field06:39
dhx_muser_api.php:248 for user_set_field( $t_user_id, 'duplicate_realname', ON );06:39
dhx_muser_api.php:592 for user_set_field( $t_user_id, 'duplicate_realname', OFF );06:39
dhx_malso06:41
dhx_mquotation marks need to be put around the realname equality expression at user_api.php:58306:42
dhx_mI'd be interested in seeing what the query actually is...06:43
dhx_mbecause for me, it shouldn't be returning more than 1 hit... yet it does06:43
[KK]Kirillyeap06:44
[KK]KirillI reproduce this bug06:44
dhx_m:)06:44
dhx_mi'll jam this into a ticket on the tracker06:44
dhx_mdid you have to force duplicate usernames though?06:47
[KK]KirillIn my work I haven't check duplicate06:49
dhx_mneither have I06:50
dhx_mthis is actually 2 bugs06:50
dhx_m1) referencing an invalid column06:50
dhx_m2) not placing quotation marks around the realname string in a database query06:50
mantisbotNew bug: Bug 10493 - dhx - open - new06:55
mantisbotNew bug: Non-existent duplicate_realname column is updated by various functions in user_api.php - http://www.mantisbt.org/bugs/view.php?id=1049306:55
[KK]KirillI check original ado-db files in cvs, they haven't this line06:55
[KK]KirillIt's "mantisbt group"'s changes06:56
dhx_mwell nothing is wrong with adodb it seems06:56
dhx_mat least for bug 1049306:56
mantisbotBug 10493 - dhx - open - new06:56
mantisbotNon-existent duplicate_realname column is updated by various functions in user_api.php - http://www.mantisbt.org/bugs/view.php?id=1049306:56
dhx_mthat is a problem with Mantis referencing a column that isn't within the schema06:56
dhx_m*however* there is another issue06:56
dhx_mwhere you can't update a real name from "A B" to "C D" without receiving the error mentioned above06:57
dhx_mwait06:57
dhx_mthat works sometimes heh06:57
dhx_moh I see06:58
dhx_mhas nothing to do with spaces it seems06:58
[KK]Kirillhttp://www.mantisbt.org/bugs/view.php?id=10493#c2182706:58
dhx_mI have differentiate_duplicates set to OFF07:00
dhx_m(or more precisely, I haven't defined it)07:00
[KK]KirillStrange07:00
[KK]KirillI haven't this error in switch OFF07:01
dhx_mbut even if I did have it on... we'd still need that column added07:01
[KK]Kirillok07:01
dhx_mok I'll force it off to see what happens07:01
dhx_meven with it forced off I get the error07:03
dhx_mit seems that option doesn't do anything for me?07:03
dhx_mthis part of the code makes no sense to me07:04
dhx_mthe function is called user_is_realname_unique which implies it is read only07:05
dhx_myet it updates the database on each call07:05
[KK]KirillIn OFF I haven't error07:05
dhx_myou're right now I look at it07:07
dhx_mexcept that it only worked when I placed that config option at the bottom of my config file07:08
dhx_mand not the top07:08
dhx_mso the placement mattered...?07:08
dhx_mah CRAP07:08
dhx_mI must have had it set to ON by mistake :(07:08
dhx_mmy bad07:08
dhx_mI can't believe I wasted that much time on finding the source of this bug... only to realise this is a broken/incomplete feature I had accidentally turned on :(07:14
dhx_m[KK]Kirill: thanks for your help :)07:20
dhx_mAustralia07:23
[KK]Kirilldhx_m: Where are you from?07:23
[KK]KirillOh :(07:23
[KK]KirillYou default lang english?07:24
dhx_myes :)07:24
[KK]Kirill:(. I have troubles with national characters in attachment07:25
dhx_myeah PHP  + UTF8 don't go well07:30
paulr_.07:43
[KK]Kirillpaulr_: lo07:43
paulr_lo07:43
[KK]Kirillpaulr: Did you have little time?07:43
paulr_when?07:44
[KK]Kirillpaulr: bug 1049407:44
mantisbotBug 10494 - Kirill - open - new07:44
mantisbotNational characters in filename of attaches - http://www.mantisbt.org/bugs/view.php?id=1049407:44
mantisbotNew bug: Bug 10494 - Kirill - open - new07:45
mantisbotNew bug: National characters in filename of attaches - http://www.mantisbt.org/bugs/view.php?id=1049407:45
[KK]Kirillplease delete screen4.png07:45
paulr_ 452                 if ( config_get_global( 'differentiate_duplicates' ) ) { 453                         $upgrades[] = new SQLUpgrade(07:46
paulr_WOW07:46
paulr_kirill: 4 deleted07:47
[KK]Kirillpaulr_: thanks07:48
[KK]KirillI forgot delete host-address07:48
dhx_mback07:56
dhx_mwas admin/upgrades/0.18.inc.php removed in the latest git master?07:56
dhx_mI don't see it :)07:56
paulr_yep07:56
paulr_removed 6 months or so ago07:57
dhx_mah ok... so the bug is really:07:57
dhx_mactually07:57
dhx_mwas the aim to remove the duplicate feature07:57
dhx_mor leave it in place?07:57
paulr_I think glenn likes it07:57
paulr_so probably best asking him07:57
dhx_mok07:57
paulr_my personal view is07:58
paulr_I have a name07:58
dhx_mit's a very ugly hack from the code I've seen07:58
paulr_John Smith07:58
paulr_if I can't use my name because someone else in the world is John Smith07:58
paulr_then what do I do07:58
paulr_Call myself Fred?07:58
dhx_mlol07:58
paulr_in a sense, I added the 'user view page thing07:59
paulr_so that you can distinguish between Fred1 and Fred207:59
paulr_(Even if it's just by user id)07:59
dhx_myep08:00
paulr_you saw my warning that trunks probably broken in some way atm?08:02
paulr_in fact, could you confirm something08:02
paulr_strtotime() returns localised times08:02
paulr_time() returns UTC/GMT08:03
paulr_aka strtotime(date()) != time()08:03
paulr_by a difference of timezone offset08:03
paulr_in seconds08:03
dhx_mback08:14
dhx_myeah I wasn't sure how many of my suggestions you added to dates3 before merging08:15
dhx_mso I figured a few things are still todo to iron out bugs08:15
giallupaulr, remind me how to activate the SOAP tests?08:17
* giallu pushing08:25
CIA-31Mantisbt: giallu * r7066e6b44774 / (26 files in 2 dirs): Move nusoap to library/08:27
CIA-31Mantisbt: giallu * rd3290c627293 /api/soap/mantisconnect.php: Fix nusoap inclusion method08:27
CIA-31Mantisbt: giallu * r10ffb96b7eb5 /tests/TestConfig.php: Fix warning08:27
gialluuhm. what's up with the commit mailing list?08:28
paulr_dhx_m: i tried to fix the main ones09:03
paulr_giallu: dunno :)09:03
dhx_mok :)09:03
paulr_giallu: I must say i'm surprised at you though09:03
paulr_:)09:03
paulr_in terms of config09:04
paulr_giallu: you create a .xml file09:04
paulr_http://www.phpunit.de/browser/phpunit/trunk/PHPUnit/Tests/phpunit.xml.dist09:04
paulr_so I think I just did09:05
paulr_</xml..09:05
paulr_<phpunit>09:05
paulr_<php>09:05
paulr_<var name="SOAP" value="foo" /.09:05
paulr_</php></phpunit>09:05
paulr_atm, i've added 'enabled' but we probably should add HOST+PORT too09:06
gialluuhm09:13
giallu$t_page = $t_plugin_path.$t_basename.DIRECTORY_SEPARATOR.09:13
giallu        'pages/.$t_action.'.php';09:13
giallumissing a ' somewhere?09:13
paulr_that's not me?09:13
gialluno09:13
paulr_but yea looks it09:13
giallujust spotted09:13
paulr_it should be 'pages' . DIRECTORY_SEPARATOR09:13
gialluno, read the ML...09:14
paulr_well, some people are still advocating it's use09:42
paulr_and finding in some circumstances it's required09:42
paulr_I suspect your probably right that's it's required less now09:42
paulr_at the same time, we currently consistantly use DIRECTORY_SEPARATOR over /09:43
paulr_and for the most part, whether we do09:44
paulr_$path . '/' . $bar09:44
paulr_or09:44
paulr_$path . DIRECTORY_SEPERATOR . $bar09:44
paulr_ends up with the same result09:45
paulr_at least by using DIRECTORY_SEPERATOR we don't end up with people going09:45
paulr_I've put "c:\inetpub\wwwroot" in config, then we append / so we have c:\inetpub\wwwroot/index.php09:46
paulr_and then try to explode on / to find the parts of the path and end up with something that does't work09:46
[KK]Kirillpaulr: Can you write one test?11:00
[KK]KirillI move mantisbt from win to linux11:00
[KK]KirillI have bad attach filename and I don't move it on linux11:01
[KK]KirillHow I can see all issue with missed attaches?11:01
paulr_[KK]Kirill: hmm ?11:31
paulr_hm11:31
[KK]Kirill:)11:31
[KK]Kirillpaulr_: forget.. I know, how I can fix. Use phpmysqmin and check filename with national character in diskfile field11:33
mantisbotNew bug: Bug 10495 - tkaufmann - open - new13:26
mantisbotNew bug: Attachements saved on DISK are not shown - http://www.mantisbt.org/bugs/view.php?id=1049513:26
[KK]Kirillwho know linux?15:25
[KK]Kirillpaul john, you around?15:26
[KK]Kirilloh.. ok.. I go home15:28
nuclear_eclipsehowdy15:36
nuclear_eclipsehere now [KK]Kirill15:37
dhx_mhey15:37
[KK]KirillHi15:37
nuclear_eclipse<- knows Linux15:37
dhx_m<-- eats Linux15:37
[KK]KirillI go home.. Can I ask you after 1 hour15:37
nuclear_eclipse:P15:37
nuclear_eclipsesure thing15:37
phl4kxhi all :)16:26
paulr_.16:32
paulr_nuclear_eclipse: so how much did we break trunk? :)16:32
nuclear_eclipsepaulr_: I'm too afraid to find out...16:48
paulr_cool16:49
nuclear_eclipsepaulr_: just tried to update my test install with the new code, and hit 401 error16:55
nuclear_eclipseAPPLICATION ERROR #40116:55
nuclear_eclipseDatabase query failed. Error received from database was #1054: Unknown column 'date_submitted_int' in 'field list' for the query: UPDATE mantis_bug_table SET date_submitted_int=?,due_date_int=?,last_updated_int=?16:55
nuclear_eclipseWHERE id=?.16:55
paulr_erm16:55
paulr_wtf?16:55
paulr_do you have the wrong schema version in your db?16:56
nuclear_eclipsenot afaik....16:56
paulr_438 #date conversion 439  440 $upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_bug_table' ), " 441         date_submitted_int              I  UNSIGNED     NOTNULL DEFAULT '1' " ) );16:57
paulr_well16:57
paulr_adding date_submitted_int is the first revision after adding the indexes to mantis_Bug_Revision_Table16:57
paulr_so? :)16:57
nuclear_eclipseso what should the proper schema vversion be?16:58
nuclear_eclipsemine is currently 8916:58
* paulr_ shrugs :)17:00
paulr_do a clean install to an empty db to check17:00
nuclear_eclipsepaulr_: I do know that the upgrade process went perfectly fine on my test install at home;  my test install at work is just probably borked somehow from how long I've had it in place...17:06
paulr_brb17:08
paulr_dirvingh10min17:08
paulrright back17:39
paulrnuclear_eclipse: lo17:58
nuclear_eclipsehi paulr18:00
paulrnuclear_eclipse: I think 86?18:00
nuclear_eclipsek18:00
paulrdo we number from 0 or 1?18:00
nuclear_eclipsemaybe it's from back when I was bugging around with revisions18:00
paulrI think i've broken my local git repo a bit18:00
ErocksteadyHi.  How can I go about changing which directory attachments are saved to?18:06
nuclear_eclipseErocksteady: manage project18:13
paulrnuclear_eclipse: how do i vew the history?18:15
nuclear_eclipsewhich history?18:15
paulrfor the moved libraries18:15
nuclear_eclipsegit log should do it18:16
paulrnope18:16
nuclear_eclipselet me check it out18:17
paulrbasically18:17
paulrwhat i normally do is use gitweb18:17
paulrto port patches when updating libraries18:17
nuclear_eclipsebtw, I got things to work in my db upgrade now18:17
paulrand to check we dont modify library18:18
ErocksteadyI have to change every project's upload directory seperately?  Is there not a way to change the default?  (i'm trying to fix the remote application vulnerability)18:19
nuclear_eclipsepaulr: add --follow to `git log` to make it follow file renames18:20
nuclear_eclipseErocksteady: set $g_absolute_path_default_upload_folder in your config_inc18:20
Erocksteadyk18:20
nuclear_eclipseErocksteady: if you're moving where attachments are stored, I believe you'll need to manually update your database to modify existing attachment entries to point to the new paths18:21
paulrnuclear_eclipse: doesn't work18:22
paulrPaul@PAUL-VISTA /c/mantis/git/mantisbt/library/nusoap (master)18:22
paulr$ git log --follow .18:22
paulrcommit 7066e6b4477477beaec3c2f3229330703571635e18:22
paulrAuthor: Gianluca Sforna <giallu@gmail.com>18:22
paulrDate:   Sun May 17 17:42:18 2009 +020018:22
paulrMove nusoap to library/18:22
paulr---18:22
nuclear_eclipsegit log --follow only works on files, for reasons I stated yesterday -- eg `git log <directory>` just gives you a history of the contents of that directory18:23
paulrhow can one see the directory18:23
paulri'm not going to do git log --follow on every file in adodb one at a time18:23
nuclear_eclipsetry -M and -C as well18:23
paulrnope doesn't do dirs18:23
nuclear_eclipsethen I'm not sure18:24
paulrcan we tag a branch18:24
paulrbefore the renames18:24
paulrso we can see history easily?18:24
nuclear_eclipsesure, `git tag <name> <ref>`18:25
paulrwhat do we want to label them?18:25
nuclear_eclipseI dunno18:25
nuclear_eclipsehonestly, I'm not sure what you're even trying to accomplish...18:26
paulrI want to be able to see the history of our commits against adodb18:26
paulrIf i got to http://git.mantisbt.org/?p=mantisbt.git;a=history;f=core/adodb;hb=cd27a2d26c9b57c403c03ffd5a8d5b3f73594cbc18:27
paulrI see history for adodb18:27
paulrso we need to tag/branch at cd27a2d26c9b57c403c03ffd5a8d5b3f73594cbc18:28
nuclear_eclipseI think the problem here is just that Git only tracks implicit renames, so it makes some things computationly complex to handle across renames, hence the trouble you're having18:28
nuclear_eclipseso assuming you don't rename files a lot (99% of projects probably don't), it's generally not a problem18:29
nuclear_eclipsehonestly, if your project *is* renaming files a lot, you're probably driving both developers and users insane...18:30
paulrso like18:31
paulrshall I just tag cd27a2d26c9b57c403c03ffd5a8d5b3f73594cbc as pre-library-renames18:31
paulr?18:32
paulrgit tag pre-library-renames cd27a2d26c9b57c403c03ffd5a8d5b3f73594cbc18:32
nuclear_eclipseuse a name with the current version in it, so that we get some context, eg library-renames-1.2.x18:32
nuclear_eclipseor renamed-libraries-1.2.x18:33
paulrhmm does that tag not push?18:34
nuclear_eclipseyou need to specifically `git push origin <tagname>` or `git push --tags`18:34
paulrcool18:35
paulrdinner18:35
paulrbrb18:35
paulrbk18:50
paulrnuclear_eclipse: can you confirm that strtotime(date()) != time() ?18:51
nuclear_eclipseA[A[A[Ajreese@iowa[~] php                                                                                                                                                                                                      < 14:5218:52
nuclear_eclipse<?php var_dump( strtotime(date()) != time() );18:52
nuclear_eclipseWarning: date() expects at least 1 parameter, 0 given in /home/jreese/- on line 118:52
nuclear_eclipsebool(true)18:52
paulrthat's not quite what i meant is it :P18:53
paulrerm18:55
paulris wiki api deprecated now?18:55
nuclear_eclipseno, not completely18:56
paulrwe can cache objects right?19:01
* paulr thinking of caching userpref object not db result19:01
nuclear_eclipsewe can technically cache anything we want; objects just take more memory than arrays19:02
paulryea fine!19:05
paulrnuclear_eclipse: can you review the url tests19:06
paulrfix the failing ones?19:06
nuclear_eclipseperhaps19:06
CIA-31Mantisbt: paul * rc83f93b42bda /core/user_pref_api.php: Store user preferences for the current user21:31
DirtyAlafter installin ght plugin for SVN integration21:50
DirtyAlI amgettin g the message21:50
DirtyAlAPPLICATION WARNING #2400: Event "EVENT_ACCOUNT_PREF_UPDATE_FORM" has not yet been declared.APPLICATION WARNING #2400: Event "EVENT_ACCOUNT_PREF_UPDATE" has not yet been declared.21:50
DirtyAlany help, tks.21:50
mantisbotNew bug: Bug 10496 - Jenolan - open - new23:29
mantisbotNew bug: Roadmap display for non-queued items - http://www.mantisbt.org/bugs/view.php?id=1049623:29

Generated by irclog2html.py