Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
30 Jan 2026

Summary of Changes

When opening a back end list with tmpl=component parameter there is a javascript error for a missing element.

Testing Instructions

Open in the back end the url /administrator/index.php?option=com_content&view=articles&tmpl=component.

Actual result BEFORE applying this Pull Request

Javascript error:
can't access property "textContent", document.querySelector(...) is null

Expected result AFTER applying this Pull Request

No Javascript error.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar laoneo laoneo - open - 30 Jan 2026
avatar laoneo laoneo - change - 30 Jan 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2026
Category JavaScript Repository NPM Change
avatar brianteeman
brianteeman - comment - 30 Jan 2026

This PR fixes the console error but i am not sure it is enough. Both with and without this PR the table column selector is not loaded when it should be. This means that if you have used the table column selector to decide which columns are displayed then it is ignored when the tmpl=component is used

avatar laoneo
laoneo - comment - 30 Jan 2026

Not sure what to do then in the case when no table name is set and no page title is defined. Adding the name attribute to the tables is out of this scope for this pr.

avatar brianteeman
brianteeman - comment - 30 Jan 2026

For me the bug is not the console error but the fact that the table column script will not run in this view

avatar laoneo
laoneo - comment - 30 Jan 2026

Thanks for sharing your opinion.

avatar brianteeman
brianteeman - comment - 30 Jan 2026

pretty sure we already have a pr that would address the situation where the page does not have a title

avatar laoneo
laoneo - comment - 30 Jan 2026

I couldn't find one.

avatar 465645 465645 - test_item - 31 Jan 2026 - Tested successfully
avatar 465645
465645 - comment - 31 Jan 2026

I have tested this item ✅ successfully on 21c8e72

C:\xampp\htdocs\joomlapbf\test_table_columns.html
Fixed a null reference error that occurred when opening backend lists with tmpl=component parameter, where the .page-title element doesn't exist. The main part fixed is:-
const tableName = $table.dataset.name
|| document.querySelector('.page-title')?.textContent?.trim()?.replace(/[^a-z0-9]/gi, '-')?.toLowerCase();


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46776.

Add a Comment

Login with GitHub to post a comment