craftcms / craftcms/cms

[5.x]: view.registerAssetBundle('craft\\web\\assets\\admintable\\AdminTableAsset') in template causes infinite refresh loop

Open
#18,191 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

{% do view.registerAssetBundle('craft\web\assets\admintable\AdminTableAsset') %} in template that is referenced in the Control Panel via a template UI element (see attached) causes an infinite loop where the template is re-render infinitely ever 1 second (approximately).

If the registerAssetBundle is not added the template never refreshes. If the registerAssetBundle is called, even if the AdminTable is not used, the refreshing happens.

Image Image
Steps to reproduce
  1. Add a template UI element to the an Entry type and reference a template that contains the code view.registerAssetBundle('craft\\web\\assets\\admintable\\AdminTableAsset')
  2. Click on one of the entry type entries in the CP to load the entry
Expected behavior

The template loads and shows the data in a table.

Actual behavior

The template is loaded and then continues to infinitely reload/refresh.

Craft CMS version

5.8.19

PHP version

8.3.28

Operating system and version

Darwin 25.1.0

Database type and version

MariaDB 10.11.6

Image driver and version

Imagick 3.8.0 (ImageMagick 7.1.2-8)

Installed plugins and versions

Plugins
Abandoned Cart 4.0.8
Amazon S3 2.2.3
Craft Commerce 5.4.9
Dumper 5.0.1
Element API 4.2.0
Elements Panel 3.0.1
Facebook Conversion v1.3.3
Feed Me 6.11.0
Linkit 5.0.1
Lists 5.0.0
Maps 5.0.4
Minify 5.0.0
Postmark 3.1.0
Ray 2.1.1
Redactor 4.2.0
Retcon 3.2.1
Retour 5.0.12
Scout 5.0.7
Sentry Logger 5.0.2
Servd Assets and Helpers 4.2.2
Sprig 3.7.1
Stripe for Craft Commerce 5.1.0.1
Upload 5.0.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the Control Panel with a template UI element whose referenced template calls registerAssetBundle for AdminTableAsset. Trace the refresh behavior when that asset bundle is registered, then verify that the template renders its table without repeatedly reloading.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.