View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014146 | mantisbt | wiki | public | 2012-04-10 05:35 | 2012-09-28 11:56 |
Reporter | ahoros | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Platform | linux | OS | ubuntu | OS Version | 12.04 |
Product Version | 1.2.8 | ||||
Summary | 0014146: integration with TWiki does not work out of the box | ||||
Description | I changed configuration settings to use TWiki they were of the format: the latter part: "mantis/project" seems to incompatible with standard TWiki convention. Is there any setting (either on TWiki side or mantis side) that I am not aware of? | ||||
Steps To Reproduce | 1) 2) | ||||
Additional Information | I have looked at previous issues: and building on that I have came up with the following - temporary but working - fix: modify MantisCoreWikiPlugin.class.php: ============> add one new function: Normalize & uppercasingfunction wiki_twiki_normalize_name( $t_project_name ) {
// Normalize (remove) all whitespace // Try uppercasing each word first
} ============> modify existing base_url function in class MantisCoreTwikiPlugin to read:
| ||||
Tags | No tags attached. | ||||
Here's my 2 cents - take it for what it's worth as I have never actually tried to integrate TWiki with MantisBT but I do use them separately. For the record, please note that the regex you propose in your function does not strictly match TWiki's WikiWord definition [1] Also, in the uppercasing each word section, I think you should apply ucword() on $t_project_name, not $t_project_name_normalized (otherwise only the 1st letter will be capitalized) What happens when the project name contains special characters (e.g. accents, punctuation...) ? Finally, IIRC in Twiki acronyms (i.e. all-uppercase words) are only valid as links/WikiWords if they are >= 3 char longs so technically a project name like "A" would not work If you can, it would be better to provide your code contributions as git patches, or at least unified diff vs a clearly identified Mantis release version. That will facilitate eventual integration of your changes by the dev team. [1] http://twiki.org/cgi-bin/view/TWiki/WikiWord#Syntax_of_a_WikiWord |
|
Dregad, I'll try to work on git this weekend, But I do have quick question regarding root_namespace in mantis ($t_namespace)
Because if such assumption can be made - than some considerations like 3 char len, or uppercasing each and every work can be less strict e.g. |
|
Thanks. If you can, the best option is to fork our repository, then send a pull request via Github. Otherwise, attach your git patch here.
You can change this in your config. See config_defaults_inc.php
The project name is just that - a name. It can contain any character that you can enter in your system and your DB can store, symbols, accented chars, non-latin alphabet... The following are a few example project names that are valid in Mantis, but could break integration or cause problems in Twiki . I think the logic of the normalize function must be improved to
I believe the correct regex for WikiWord validation should be /^[A-Z][a-z0-9][A-Za-z0-9][A-Z][A-Za-z0-9]$/ (not tested) EDIT: I also think we should append '/bin/view' as part of the MantisCoreTwikiPlugin class instead of relying on users to add this to their config. |
|
Unassigning - not sure how the reporter managed to assign to vboctor in the first place |
|
Edited: I tested, probably he is assigned. |
|