Sunday, 2010-01-17

../irclogs/#mantishelp.2010-01-17.log
--- scribe started ---00:00
Jan\how do I edit the "report issue" form?00:07
Jan\i specified $g_top_include_page but the logo doesn't change?01:16
daryn_g_logo_image i think01:25
daryn_yeah, change the logo url with g_logo_image01:25
daryn_the html is distributed throughout the code so it's a bit of a pain01:27
daryn_we're trying to move towards a templating system but it's been difficult to make any progress01:28
dhx_mhi01:30
dhx_mpaul__: ADMINISTRATOR is more correct, because that is the default level at which someone can change the config stored in the database01:30
daryn_hi dhx_m01:32
daryn_do you know what happened with the require_lib and require_api functions?01:34
dhx_mthey're still in place at the moment01:38
daryn_trying to work on phptal and it suddenly can't find the templates01:38
dhx_mwell the direction we're trying to head towards is an OO API where classes are autoloaded as needed01:39
dhx_mafaik01:39
dhx_mmy changes are really just designed to make it easier/more reliable to include an API and know that it'll "just work"01:39
dhx_mwithout having to worry about what "what else do I need to load first"01:39
dhx_mthe downside is that coupling may be higher in some places01:40
dhx_mas our API is heavily coupled at the moment (not a good thing)01:40
daryn_yes01:40
dhx_mfor instance, bug_api.php has function calls to dozens of other API ranging from twitter_api to project_api01:40
dhx_mproject_api would be expected though :)01:40
daryn_so has this changed require_once?  why would require_once no longer work?01:42
Jan\how do I edit the "report issue" form?01:42
Jan\I want to remove "Additional Information"01:42
daryn_Jan\ if you're using 1.2 you can disable it in config_inc.php01:43
daryn_remove it from the form anyway01:43
dhx_mJan\: you need 1.2.x, then check config_defaults_inc.php for the options relating to what fields to show/ask for when reporting, updating and viewing bugs01:43
Jan\i'm using 1.1.801:43
Jan\the stable01:43
daryn_check bug_report_page.php01:44
Jan\thx01:44
Jan\how do I make some fields default?01:47
Jan\like a default version01:47
daryn_in the bug_report.php file the second parameter passed to the gpc functions is default01:48
Jan\$t_bug_data->version= gpc_get_string( 'product_version', '' );01:49
Jan\i put text there?01:50
dhx_mgpc_get_string( 'product_version', 'something' );01:50
dhx_mwhere 'something' is the default value...01:50
Jan\ok01:50
dhx_mnote that in 1.2.x this has been fixed more properly by using config_get( 'default_something_value' ) in place of 'something'01:50
dhx_mso you can have a different default for each project01:50
Jan\$t_bug_data->category= gpc_get_string( 'category', config_get( 'default_bug_category' ) );01:51
Jan\whats default bug category?01:51
Jan\can I change that?01:51
dhx_myes01:52
dhx_mcheck config_defaults_inc.php for more information on that setting01:52
Jan\$t_bug_data->version= gpc_get_string( 'product_version', 'alpha' );02:02
Jan\that doesn't work02:02
dhx_mversions are IDs, not strings :)02:02
dhx_mat least in 1.2.x02:03
Jan\ffs02:03
Jan\when is 1.2 planned for?02:03
dhx_mjust use it now in it's near-release-state02:03
dhx_mit's easily upgraded to the final release version02:04
Jan\you know all these settings could be edited with http frontend02:04
dhx_myes02:04
Jan\so why is it not that?02:05
dhx_mMantisBT is behind when it comes to admin config UI02:05
dhx_malways looking for contributors :)02:05
dhx_mit isn't really that much of an issue as most people prefer editing a text file02:05
Jan\u want a config ui?02:05
dhx_m"most" = my view of it anyway ;)02:06
dhx_mwell we have part of one... it just needs a lot of work02:06
Jan\editing text files are annoying when the webserver isnt local ;)02:06
dhx_mmost users would be editing via ssh with vim/etc02:07
dhx_mor alternatively, have an sftp file system mounted locally on their workstation, from where they can use any UI editor of their choice02:08
Jan\well its still annoying02:09
daryn_doh!02:11
Jan\wanna know why?02:12
dhx_mwhen you're not the one with access to wwwroot?02:12
Jan\also that mantis is php/http web based bugtracker...02:13
Jan\and that you basicly have to do more steps to edit the config files than edit the config from the http mantis admin panel02:16
dhx_mthere are some reasons for forcing editing via text files02:17
Jan\clever name, mantis, btw02:17
Jan\dhx_m are the reasons to just annoy and waste your time ?02:18
dhx_mmore to do with security issues I'd say02:18
dhx_mSQL injection attacks on a database shouldn't let someone escalate the problem02:18
Jan\well if you look at the other php/mysql software, i.e. forums, they seem ok...02:19
dhx_mwhich would be possible if we have configuration in the database that lets people change paths, URLs, etc02:19
dhx_mit's something we could fix02:19
dhx_mit just requires a lot of careful attention to make sure it works OK02:19
nuclear_eclipseJan\: tbh, things like phpbb or wordpress don't exactly have a good track record :P02:19
dhx_mnuclear_eclipse: hi :)02:19
Jan\nuclear_eclipse yeah but they fix it in the next release :P02:19
dhx_mnuclear_eclipse: any thoughts on changing $g_global_settings to be a whitelist instead of a blacklist?02:20
nuclear_eclipseI'd just settling for being able to make *a release* right now...02:20
dhx_mnuclear_eclipse: and scrap the regex to increase performance?02:20
Jan\I meant the equivalent of security releases that are more frequent02:21
dhx_mnuclear_eclipse: that way we can also easily make the configuration admin page have a dropdown box of possible config values to modify02:21
nuclear_eclipseI know, just making passive aggressive comments here :P02:21
nuclear_eclipsedhx_m: I dunno02:21
Jan\I'd use trac but I don't have access to python/perl/etc :P02:22
dhx_mJan\: MantisBT 1.2.x will be pretty secure (one time form validation tokens, tested against XSS bugs, input validation everywhere (no SQL injection), etc02:22
Jan\the "clever" webhost of my client decided to turn off ssh access for "security reasons"02:24
nuclear_eclipsemy apologies02:25
dhx_mat least they're being honest about their faith in the security of their servers :D02:25
Jan\so everytime I make a config change I have to go edit files with cPanel file manager02:26
dhx_mie. they know if they enable SSH access, people will root it02:26
dhx_mbecause it's misconfigured02:26
dhx_mthe least they could do is enable sftp access to your web root02:26
Jan\I don't know, they actually got this other "security measure" that if you misstype your password 3 times for cPanel access your IP gets blacklisted on their servers02:27
nuclear_eclipseoh god02:28
dhx_mhahaha02:28
dhx_mtime to change hosts?02:28
Jan\so guess what happens if your ISP gives you dynamic IPs and some other person "missed" their password more than 3 times and you end up with that IP?02:29
Jan\you can't access your website :D02:29
nuclear_eclipseI have that for SSH access on my server, but a) it's only a temporary ban, and b) nobody's logging in with a password except for the very rare occasion when I'm at a PC without my ssh key02:29
nuclear_eclipseoh, and c) the threshold is 5 misses02:30
nuclear_eclipseif you miss you password 5 times in a row, that's most likely no longer an accident :P02:31
dhx_mnuclear_eclipse: do you ever use git interactive add (git add -p)?02:31
nuclear_eclipseyep02:31
nuclear_eclipseall the time02:32
nuclear_eclipsethere's actually two versions02:32
dhx_mnuclear_eclipse: do you know if it's meant to work if you just have a single hunk?02:32
nuclear_eclipse-i and -p02:32
Jan\mantis is like the only php bug tracker :/02:32
dhx_mnuclear_eclipse: every time I run it, it prints the diff and exits back to my shell straight away (no interactiveness)02:32
dhx_mnuclear_eclipse: git add -i does have a menu... but when you use [p] to patch a file, it also shows a diff and exits02:32
nuclear_eclipseit should run just fine with one chunk, because you should potentially be able to ask git to try and split it02:32
dhx_myep that is what I was after02:33
dhx_mit's probably a bug with Gentoo's compilation of git... or a mistmatch of versions between Perl and git02:33
nuclear_eclipseperhaps02:33
nuclear_eclipseyet another reason I never use Gentoo :P02:33
CIA-22Mantisbt: hickseydr * re1d134e7dcb8 /docbook/adminguide/en/configuration.sgml: Fix #11400: Update documentation of $g_view_configuration_threshold02:37
dhx_mit saves me in other ways :D02:37
CIA-22Mantisbt: hickseydr master-1.2.x * r9b1fbd7766fd /docbook/adminguide/en/configuration.sgml: Fix #11400: Update documentation of $g_view_configuration_threshold02:37
nuclear_eclipseomg, I wish people would really learn to search for their problems before they submit yet another report of the same bug that's been reported 5 times already...02:37
dhx_mwhich one?02:38
nuclear_eclipse1140202:38
Jan\do you use mantis to trac bugs ? :D02:38
nuclear_eclipseI use four different mantisbt trackers on a regular basis :P02:39
nuclear_eclipseeach one configured significantly different than the others02:39
dhx_mnuclear_eclipse: have we fixed that problem?02:41
nuclear_eclipseI'm pretty sure we have02:41
nuclear_eclipseI know I've seen way too many bug reports about in_array, and I'm pretty sure paulr's been through all of them02:42
nuclear_eclipsespeaking of which: paul__ thereL02:42
nuclear_eclipse?02:42
dhx_mnuclear_eclipse: most of these sorts of errors (like the one in #10818) appear to be because someone decided to hack their database themselves, screwing it up :)02:42
Jan\thats another reason you gotta have http config02:43
nuclear_eclipsethere were a few bugs where people had screwed up the param order to in_array, or didn't make sure they were passing an actual array to in_array....02:43
nuclear_eclipseJan\: feel free to submit an improved manage configuration setup :P02:44
Jan\i don't know php, just markup stuff02:44
Jan\meaning, maybe I could design the UI but that's it02:45
dhx_mnuclear_eclipse: I'm toying with an OO approach to fields at the moment (treat every field as a custom field essentially)02:46
nuclear_eclipsedhx_m: good luck on that :P02:46
dhx_mnuclear_eclipse: I'll need it, yeah :)02:46
dhx_mnuclear_eclipse: the real problem is with how to store database in the database02:47
dhx_moops... how to store DATA :)02:48
Jan\lets all watch "A Bug's Life"02:49
dhx_mnuclear_eclipse: does this look valid to you: return is_array( $columns ) ? $columns : array();02:54
dhx_mie, return an array with no elements if $columns isn't an array02:55
dhx_mtrying to fix the in_array() problem for good :)02:55
dhx_mseems to work from what I can see02:57
CIA-22Mantisbt: hickseydr * r90d3d4db7306 / (core/database_api.php manage_user_page.php): Fix #10818: MetaColumnNames ADOdb function may return bool value03:06
CIA-22Mantisbt: hickseydr master-1.2.x * rd6b2fd0939ad / (core/database_api.php manage_user_page.php): Fix #10818: MetaColumnNames ADOdb function may return bool value03:06
nuclear_eclipseumm, sure :P03:12
nuclear_eclipsesry, was on a diff screen working on mail server scripts... :P03:12
dhx_m:)03:12
* dhx_m is utterly confused with function project_hierarchy_cache( $p_show_disabled = false ) {03:23
dhx_mwhy wouldn't you want to cache disabled projects03:23
nuclear_eclipsedhx_m: when all you need to do is show the project dropdown list on normal pages? :P03:24
dhx_mwell, I guess this is more of an issue on the manage_project_* pages03:24
dhx_mnuclear_eclipse: so that means I'll have to call project_hierarchy_cache multiple times on the manage_project_ pages03:25
nuclear_eclipse /shrug03:25
dhx_mie. we won't know if the cache was built with disabled projects03:25
dhx_mso we have to forcefully regenerate it each time we want to show disabled projects03:25
dhx_mah03:26
dhx_m$g_cache_show_disabled = null;03:26
dhx_mis already a setting for me03:26
nuclear_eclipsedhx_m: you'll find there are a great many things in Mantis that I just ignore the details of because I don't want to go insane03:27
dhx_mlol03:27
dhx_mlooks like I've got to change the project_hierarchy_api for 1.2.x then03:27
dhx_mit is somewhat backwards compatible though03:28
dhx_mas all I have to do is add a new $p_show_disabled parameter to some of the functions03:28
dhx_mto specify if the user wants to consider disabled projects03:28
dhx_m*headache*03:45
nuclear_eclipsesee?03:50
nuclear_eclipseI told you03:50
dhx_mI might have fixed it03:51
dhx_malthough it looks crap03:51
dhx_mfrom a software design POV03:51
dhx_mit's horrible to have manage_proj_* pages have to be concerned with calling project_hierarchy_cache()03:52
dhx_mI might be able to remove that actually03:52
CIA-22Mantisbt: hickseydr * rbf80e9eecc42 / (core/project_hierarchy_api.php manage_proj_edit_page.php): Fix #11402: Project hierarchy cache problem on manage_proj_edit_page.php03:54
CIA-22Mantisbt: hickseydr master-1.2.x * rdd258c75542e / (core/project_hierarchy_api.php manage_proj_edit_page.php): Fix #11402: Project hierarchy cache problem on manage_proj_edit_page.php03:54
CIA-22Mantisbt: hickseydr * r443d28a22465 / (5 files in 2 dirs): project_hierarchy_cache function shouldn't be called outside API04:04
CIA-22Mantisbt: hickseydr master-1.2.x * re8ae3806d158 / (5 files in 2 dirs): project_hierarchy_cache function shouldn't be called outside API04:04
CIA-22Mantisbt: hickseydr * r391d3e8067f9 /manage_user_page.php: Fix #4654: Preserve sort field and order when changing filter04:40
CIA-22Mantisbt: hickseydr master-1.2.x * r2c8f64b0bf24 /manage_user_page.php: Fix #4654: Preserve sort field and order when changing filter04:40
paul__daryn_: moo11:06
paul__dhx_m: moo even11:06
dhx_myo11:07
paul__regarding http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=90d3d4db7306108af7316cf009fd8b8bab3b168011:08
paul__ahh, nm11:08
paul__http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=443d28a22465752f99996bb67ce82cbf883e8ff711:09
paul__not sure I like this11:09
paul__the reason for caching it11:09
paul__was that some of our external api's11:09
paul__loop through all projects11:09
paul__the call to project_cache tells it to get all rows from dB11:10
paul__to save getting them a few/one at a time11:10
paul__i.e.11:11
paul__the calls to project_hierarchy_cache where added by me11:12
paul__when evaluating mantis with ~2000 projects/subprojects11:12
paul__under xdebug11:12
paul__to fix performance11:12
paul__I suspect by removing the calls to  project_hierarchy_cache you've just reopened bugs to mantis failing with large numbers of projects :)11:12
dhx_mmost of the functions there have an argument11:13
paul__project_hierarchy_cache caches the whole hierarchy11:14
paul__first11:14
dhx_mwhich accept a parameter to decide whether to cache disabled projects too11:14
paul__when I added those11:15
paul__http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=3bdff58abc2e8bf0ecf7f949bb21c4dd87149fc311:15
paul__I removed project_cache_hierarchy from core.php11:15
paul__i.e. we used to cache_all projects in core.php11:15
paul__which is silly if your just hitting a bug view page in one project11:16
dhx_myep11:16
dhx_mwe don't need it elsewhere either anymore11:17
paul__why?11:17
dhx_mfor this sort of reason: http://git.mantisbt.org/?p=mantisbt.git;a=blobdiff;f=manage_proj_edit_page.php;h=e85e2a7e2ad664632cd4ed6932294393d6baed54;hp=3d951589e0ca530f9aa3e395bc7e7ba5869c2c03;hb=bf80e9eecc420c38a732d2e13ef2b3cb1a6b04d3;hpb=90d3d4db7306108af7316cf009fd8b8bab3b168011:18
paul__but you removed those?11:18
paul__your missing the point11:18
paul__-       project_hierarchy_cache();11:18
paul__+       project_hierarchy_cache( true );11:18
paul__== cache ALL projects in advance11:19
paul__hmm11:19
dhx_mthen I removed that11:19
dhx_mbecause the functions within project_hierarchy_api accept a parameter specifying whether you want to include disabled projects11:19
dhx_mobviously for a project dropdown, you don't want to know about disabled projects11:20
dhx_mbut for the manage_ pages, you do11:20
dhx_mand I guess on the manage_ pages, you need to have both11:20
dhx_mbecause the project dropdown may appear on those pages :)11:20
dhx_m(in the header)11:21
paul__print api11:21
paul__calls project_hierarchy_inheritance()11:21
paul__without the project_hierarchy_cache();11:21
paul__therefore  $p_show_disabled = false11:21
paul__which means  project_hierarchy_inheritance doesn't get called11:21
paul__theefore $g_cache_project_inheritance is gonna be null11:22
paul__therefore oreach( $g_cache_project_inheritance[$t_project_id] as $t_parent_id ) { is going to return null11:22
paul__so unless i'm mistaken11:22
paul__project_hierarchy_inheritance will now return an empty array11:23
dhx_m+function project_hierarchy_inheritance( $p_project_id, $p_show_disabled = false ) {11:24
dhx_mset the 2nd parameter to 2 to get the full cache (with disabled projects)11:25
dhx_mproject_hierarchy_cache() remembers if it has already cached:11:25
dhx_m1) project fields that are enabled11:25
dhx_m2) projects that are both enabled and disabled11:26
dhx_mso it won't continually cache the same thing11:26
dhx_mat worst, it could cache enabled projects only11:26
dhx_mthen it'd need to go back later and also cache the disabled ones11:26
paul__wait why do we need the ||11:27
paul__wait11:27
paul__surely we should drop the if11:27
paul__and just be doing project_hierarch cache?11:27
dhx_myeah11:27
dhx_myou're right11:27
paul__maybe we should really be doing11:27
paul__ $g_cache_project_inheritance[true|false]11:28
paul__to store if we are showing disabled11:28
dhx_malso project_hierarchy_cache should not pull enabled projects from the database if it already has them11:28
paul__mm11:28
paul__that's probably less of an issue11:29
dhx_mit should just pull the disabled projects from the database11:29
dhx_mand append that to the already cached list of enabled projects11:29
paul__(for the most part, i'd hope we are always using disabled=false11:29
paul__except on admin pages where we set it to true (sometimes)11:29
dhx_mand all those functions like project_hierarchy_inheritance11:29
dhx_mshould actually exclude disabled projects (unless asked to include them)11:29
dhx_mie. look through the cache, but ignore disabled projects11:29
dhx_myep11:30
dhx_mI've got 3 major features on the way in a moment (1.3.x)11:30
paul__I dont like the fact we have a hierarchy api + projects api11:30
dhx_mbrb11:30
paul__which are interlinked11:30
paul__iirc11:30
dhx_myeah it's not pretty11:30
paul__I seem to recall when looking there's all sorts going on11:30
dhx_mnot the worst part of Mantis though11:30
paul__I'm out for lunch but gonna try and sort ldap stuff when i get back this evening11:31
dhx_m:)11:31
dhx_mI really hate it how history_api only has 2 fields to store data in11:47
dhx_meverything you want to log regarding bugnotes (or relationships, etc) needs to have the bugnote_id... and then 2 fields for previous and current values11:49
paul__right need to go bbl11:49
dhx_mok11:50
CIA-22Mantisbt: hickseydr * rda6c133f1d50 / (15 files in 4 dirs): Issue #10884: Improve granularity of bugnote permissions12:21
CIA-22Mantisbt: hickseydr * rdac9d0aae688 / (4 files in 2 dirs): Issue #11405: Add link to bugnote revisions within bugnote display12:21
CIA-22Mantisbt: hickseydr master-1.2.x * rb9bd739473f7 /core/ (bugnote_api.php history_api.php): Fix #11403: Bugnote ID not formatted correctly in history (view status)12:21
CIA-22Mantisbt: hickseydr * r14a00b723578 / (4 files in 2 dirs): Issue #11404: Record dropping of bug revisions in bug history12:21
CIA-22Mantisbt: hickseydr * re7283356da95 /core/ (bugnote_api.php history_api.php): Fix #11403: Bugnote ID not formatted correctly in history (view status)12:21
CIA-22Mantisbt: hickseydr * rb4581cdccf2e /core/project_hierarchy_api.php: Remove duplicate checks that are performed in project_hierarchy_cache12:30
CIA-22Mantisbt: hickseydr master-1.2.x * r4dfa13341720 /core/project_hierarchy_api.php: Remove duplicate checks that are performed in project_hierarchy_cache12:30
CIA-22Mantisbt: s.mazeland * r592f4d7f981e /lang/strings_english.txt: We have issues and notes. "bugs" and "bugnotes" are nonos!13:39
* siebrand slaps dhx_m around a bit with a large trout13:40
* giallu misses bugs...15:49
paul__dhx_m: +$g_bugnote_user_edit_threshold = $g_update_bugnote_threshold;22:53
paul__can we avoid doing that22:53
paul__so that if we re-order file22:53
paul__we dont introduce bugs22:53
dhx_mpaul__: ok, I'll use the %g_setting% format instead then23:14
dhx_msiebrand: sorry ;)23:15
siebranddhx_m: don't let it happen again. Next time it's a salmon.23:15
dhx_msiebrand: haha, I still have to fix the use of "Bug" in the revision drop history23:16
* siebrand shows an evik grin.23:16
CIA-22Mantisbt: hickseydr * re0064ff882e0 /lang/strings_english.txt: Use the word "Issue" instead of "Bug" for revision history message23:37
CIA-22Mantisbt: hickseydr * r370303ccf84d /config_defaults_inc.php: Allow configuration values to be rearranged in config_defaults23:37

Generated by irclog2html.py