Skip to content

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

@dgrigg

Description

@dgrigg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions