Repository navigation
Task Issue 992 Delete Legacy ProjectView
Status: implemented on task/issue-992, verified locally against the repo's
MariaDB fixture (127.0.0.1:3307) and PHP 8.4.28 built-in server.
The issue named lib/project/projectView.php and
gui/templates/dashio/project/projectView.tpl. A pre-change grep found 121
projectView matches, of which three were live and would break if only those
two files were removed:
-
lib/project/projectEdit.php:120-125renderedprojectView.tplafter every successful legacydoCreate/doDelete/doUpdate/setActive/setInactive/enableRequirements/disableRequirementswrite. The file itself must stay (issue text: held under #967), so the template could not be deleted until that flow had a different destination. -
lib/functions/testproject.class.php:4831-4833builtsearchActionanddisplayListURLfor the legacy controller.getViewActions()is still called byprojectEdit.php:739, anddisplayListURLfeeds the Cancel button of the still-livegui/templates/dashio/project/projectEdit.tpl:290. -
gui/templates/dashio/testcases/containerView.tpl:172linked the test project name to the legacy controller (rendered throughlib/testcases/containerEdit.php).
Template resolution was confirmed: lib/functions/tlsmarty.inc.php:101-110
pins Smarty's main template dir to gui/templates/dashio/, and
common.php:1109-1125 derives project/ from SCRIPT_NAME, so the ambiguous
projectView.tpl name resolves to the dashio twin — not the tl-classic one.
$tlCfg->gui->ux = 'tl-classic' (config.inc.php:161) has no reader.
| File | Change |
|---|---|
lib/project/projectView.php |
DELETED (legacy controller, mgt_modify_product check + list/search; modern api/projects already enforces the same right on every route) |
gui/templates/dashio/project/projectView.tpl |
DELETED (legacy DataTables list) |
gui/templates/tl-classic/project/projectView.tpl |
DELETED (orphaned theme twin, per #984/#966/#947 precedent) |
lib/project/projectEdit.php |
Successful legacy writes now redirect() to gui/templates/projectsView.html instead of rendering the removed template; the now-unreachable legacy list-render block (and its undefined $add*Tracker variables) removed; a silent create() failure no longer counts as success; stale $op->template assignment removed |
lib/functions/testproject.class.php |
getViewActions() now emits the modern screen for searchAction / displayListURL; the unused $environment string removed |
lib/functions/common.php |
#992 note on $actions->projectView corrected (legacy controller no longer exists) |
gui/templates/dashio/testcases/containerView.tpl |
project link → gui/templates/projectsView.html
|
gui/templates/dashio/testcases/include/testprojectView.inc.tpl |
same retarget (dead include, kept consistent) |
gui/templates/dashio/content.tpl |
same retarget (dead include, kept consistent) |
gui/templates/tl-classic/mainPageLeft.tpl, testcases/containerView.tpl, project/projectEdit.tpl
|
same retarget in the unused classic theme so no dangling URL remains anywhere in the tree |
Kept deliberately: lib/project/projectEdit.php +
gui/templates/dashio/project/projectEdit.tpl (explicitly held under #967).
Also accepted explicitly: the old template's doViewReload navbar refresh after
legacy writes is not reproduced — no live UI reaches that form any more, and
the modern screen/BFF already behaves the same way.
Left deliberately: $tlCfg->gui->projectView->pagination (config.inc.php)
and [projectView] in gui/templates/conf/input_dimensions.conf — no reader
remains after the deletion, but the same dead config was reported-and-kept in
#976, so it is not part of this cleanup. Historical docs/wikis and locale
section comments that mention the removed files are provenance, not links, and
are likewise left untouched.
-
php -l lib/functions/testproject.class.php,php -l lib/project/projectEdit.php,php -l lib/functions/common.php→No syntax errors detected. -
grep -n 'projectView.php\|projectView.tpl'after the change → only docs, CHANGELOG, locale section comments andprojectsView.htmlparity comments remain; zero live PHP/URL/template references. - HTTP against
http://127.0.0.1:8083: legacy controller 404, both template paths 404,gui/templates/projectsView.html200,gui/templates/dashio/project/projectEdit.tpl200 (still URL-addressable),api/projects/index.phplist 200 with the project payload. - Legacy edit flow with a temporary project
ZZ992CleanupProbe(BFF id 1899):GET projectEdit.php?doAction=create→ 200, Cancel button callslocation.href=fRoot+'gui/templates/projectsView.html';doAction=setInactiveandsetActiveboth returned<script>location.href='.../gui/templates/projectsView.html'</script>and no Smarty error; fixture deleted again through the BFF (0 rows left). - Browser (headless Chromium via chrome-devtools MCP): modern screen renders the
DataTables grid (1 seeded project, 8 columns, footer "Showing 1 to 1 of 1
entries"); legacy URL renders the browser's 404 page; clicking Cancel on the
legacy create form navigates to
projectsView.html. Console shows only the two pre-existing generic warnings (label/for and form-field id), unrelated to this cleanup. Screenshot:docs/screenshots/issue-992-projectsview-after-cleanup.png. - Event Viewer table: all rows from the test window are
log_level=16(AUDIT: login + fixture create/delete); 0 Error, 0 Warning rows. - Code review (subagent, rule 16): APPROVE, no must-fix items. Both helpful
notes were applied — dead post-redirect render block removed, and a silent
create()failure now keepsstatus_ok=0so it cannot masquerade as a successful redirect. Re-ranphp -land the fixture create/toggle/delete cycle after those edits: redirect still correct, fixture rows back to 0.
cd /home/sebi/testlink
git checkout task/issue-992
php -S 127.0.0.1:8083 -t . &
# login admin/admin, then:
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8083/lib/project/projectView.php # 404
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8083/gui/templates/projectsView.html # 200
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8083/lib/project/projectEdit.php?doAction=create # 200