View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0035180 | mantisbt | html | public | 2024-12-19 10:59 | 2025-03-01 18:40 |
Reporter | raspopov | Assigned To | community | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.27.0 | ||||
Target Version | 2.27.1 | Fixed in Version | 2.27.1 | ||
Summary | 0035180: The MantisBT web interface must pass HTML validation | ||||
Description | It is very desirable that the HTML and CSS are flawless and pass the checks for example at https://validator.w3.org/. Current reports show a few bugs, lots of warnings and advisories, mostly due to a fairly old version of HTML. Poorly formatted HTML makes it difficult to develop themes, affects compatibility with browsers and non-computer devices, and has a bad effect on accessibility. | ||||
Tags | No tags attached. | ||||
Fix for first error, PR 2057 Incorrectly placed <style> tag. |
|
Thanks. Do you intend to submit more changes like this ? If so I'd rather regroup them under this single issue, which can remain open until you're done or I'm ready to release 2.27.1 (whichever comes first). |
|
Yes, I'd like to suggest some more changes in the future, like setting a language for the <html> tag or unifying the output of widgets. It all started when I wanted to add a new button to check the SQLite database and saw inconsistent output of the same HTML markup in different files.... |
|
PR 2058 for adding "lang" attribute of "html" tag. |
|
PR 2057 and 2058 have been merged, thanks @raspopov. |
|
One thing confuses me, MantisBT defines the type of generated content as html, but some tags, for example |
|
Many years ago (before 1.3 was released), a former developer switched the doctype to strict XHTML (see 0012545), but that was causing more problems than anything else so I ended up reverting the change, and we ultimately switched to HTML5 (0016025). So those are artefacts leftover from those days, feel free to fix them. |
|
When the width of page with "Upload Files" dropzone is reduced to 767px, the following rule from bootstrap-3.4.1.min.css is activated:
Which is unintentionally inherited by the dropzone |
|
The next interfering element is the This PR fixes both of the above problems: 2085. These changes will allow the page width to be reduced to 460px, any more than that and the ‘Select Profile’ element starts to get in the way. |
|
MantisBT is irresponsible when building parameters for GET requests. The rawurlencode() function should be used everywhere. For example, the URL used for filtering uses unencoded characters "[" and "]" and violates RFC3986 requirements. |
|
Some improvements: https://github.com/mantisbt/mantisbt/pull/2095 And next bunch of fixes: https://github.com/mantisbt/mantisbt/pull/2096 I noticed that the MantisBT unit tests failed on PHP 8.4, but this is a "master-2.27" branch that should not run on that version actually. For local checking I use latest “Nu Html Checker” (version 24.12.23). |
|
Yes, I merged the PHP 8.4 fixes into Master branch only so it's normal that they would fail in 2.27 branch. Note: the 8.4 builds are considered "experimental" in the matrix, which will set the continue-on-error flag to prevent the overall build to fail. You will notice that the workflow runs are green in https://github.com/mantisbt/mantisbt/actions, but in the PR's checks tab for some reason it shows with a red X. With TravisCI we had an allow_failures option, but as far as I know there is no equivalent in GitHub Actions. This is a known and long-standing feature request with many upvotes, but as of today still not implemented.
Nice tool ! |
|
Did you notice that a few hours after your post, discussions were continued and the following option was suggested? https://github.com/mainmatter/continue-on-error-comment |
|
I did not, thanks for the heads up. I'll check if we can leverage the action somehow. |
|
More PR: https://github.com/mantisbt/mantisbt/pull/2110 Perhaps in the end it will be possible to package all the code for outputting pages, tables, etc. into a simple set of print functions. This will allow, for example, to easily change the template for forming tables from <table> to flex <div> (otherwise tables don't fit on smartphone screens). |
|
@raspopov I'd like to release 2.27.1, hopefully by end of this week, so as previously mentioned in 0035180:0069592 I would prefer this Issue to remain closed with all the fixes that have already been merged, and you open another one targeted at 2.28.0 to track 0035180:0069925 / PR 2110 as well as any future fixes of this kind. |
|
I created 0035503 to track continuation of this work item in 2.28.0. |
|
MantisBT: master-2.27 39e340e4 2024-12-19 15:17 Committer: dregad Details Diff |
Fix invalid HTML A <style> tag was incorrectly placed inside a <body> tag instead of a <head> tag. Issue 0035180, PR https://github.com/mantisbt/mantisbt/pull/2057 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0035180 |
|
mod - core/layout_api.php | Diff File | ||
MantisBT: master-2.27 4e49e931 2024-12-22 08:39 Committer: dregad Details Diff |
Add the 'lang' attribute to the '<html>' tag Uses new function lang_get_current_lang(). Improve PHPDoc for $g_language_auto_map. Issue 0035180, PR https://github.com/mantisbt/mantisbt/pull/2058 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0035180 |
|
mod - config_defaults_inc.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
mod - core/lang_api.php | Diff File | ||
MantisBT: master-2.27 5a12a854 2025-01-31 10:22 Committer: community Details Diff |
Fix unnecessary scroll bar when scaling a page Fixes 0035180, PR https://github.com/mantisbt/mantisbt/pull/2085 |
Affected Issues 0035180 |
|
mod - css/ace-mantis.css | Diff File | ||
mod - css/default.css | Diff File | ||
MantisBT: master-2.27 7d097dd7 2025-02-21 17:49 Committer: community Details Diff |
Fix HTML errors and warnings Issues reported by Nu Html Checker: - Error: Stray end tag i in filter_print_view_type_toggle() - Error: Element option without attribute label must not be empty in filter_draw_selection_area() - Error: Row 7 of a row group established by a tbody element has no cells beginning on it - Warning: A table row was 0 columns wide, which is less than the column count established by the first row (8) in filter_form_draw_inputs() - Warning: The type attribute is unnecessary for JavaScript resources in html_javascript_link(), - html_javascript_cdn_link() and html_head_javascript() - Error: Illegal character in query: [ is not allowed in my_view_inc.php - Error: End tag for body seen, but there were unclosed elements in lost_pwd_page.php - Error: Unclosed element div - Warning: Consider avoiding viewport values that prevent users from resizing documents in layout_head_meta() - Error: An img element must have an alt attribute, except under certain conditions in layout_login_page_logo() - Error: Element div not allowed as child of element ul in this context in layout_breadcrumbs() Add a new method TableGridLayout::render_spacer() to print a HTML code for a spacer row of current table. Add new function string_build_query() to string_api.php, a unified call of http_build_query(). Moved the extra code from layout_page_begin() and layout_page_end() to new paired functions layout_main_content_row_begin() and layout_main_content_row_end(). Fixes 0035180, PR https://github.com/mantisbt/mantisbt/pull/2096 |
Affected Issues 0035180 |
|
mod - core/filter_api.php | Diff File | ||
mod - core/filter_form_api.php | Diff File | ||
mod - core/html_api.php | Diff File | ||
mod - core/layout_api.php | Diff File | ||
mod - core/string_api.php | Diff File | ||
mod - lost_pwd_page.php | Diff File | ||
mod - manage_proj_create_page.php | Diff File | ||
mod - manage_proj_edit_page.php | Diff File | ||
mod - manage_proj_page.php | Diff File | ||
mod - manage_tags_page.php | Diff File | ||
mod - my_view_inc.php | Diff File | ||
MantisBT: master-2.27 aacb4357 2025-02-21 18:06 Committer: community Details Diff |
Add appropriate titles to login pages Improvements for issue 0035180. PR https://github.com/mantisbt/mantisbt/pull/2095 |
Affected Issues 0035180 |
|
mod - login_page.php | Diff File | ||
mod - login_password_page.php | Diff File | ||
mod - lost_pwd_page.php | Diff File | ||
mod - signup.php | Diff File | ||
mod - signup_page.php | Diff File | ||
mod - verify.php | Diff File |