[BUG]: missing 'use' in admin tmpls #1117
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1117
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
I've installed the component on my joomla site, but navigating the component dashboard I get an error (ArrayHelper is not defined).
I can fix the problem addding
use JCB\Joomla\Utilities\ArrayHelper;
at the top of these files:
-admin/tmpl/<component_name>/default_vdm.php
-admin/tmpl/import/default.php
Steps to reproduce the Bug
Create the component, build and install
Which Joomla version are you compiling in?
3.10.12
Which PHP version are you compiling in?
8.2.2
Which Joomla versions are you targeting?
4.4.4
Which PHP version are you targeting?
8.2.4
Which Web server is JCB running on?
Apache 2.4
Which Relational Database is JCB running on?
MySql 8.0
Which OS is JCB running on?
Windows 11
Which JCB version are you using?
3.2.1-rc4
Where in JCB did this issue occur?
Compilation of a component, Dashboard(admin_view)
On which browsers did you encounter the issue?
Firefox, Chrome
Additional Comments
No response
Hmm this one seems strange since the
ArrayHelper
is loaded via the SUPER power implementation. Which means it should add theuse
statement automatically.Which it is doing in all my extensions (to name a few):
Which means we will need to look a little closer at this issue... since the
use
statement is not added, we will need some extra details as to understand why... and does it also not add it in other areas.The new Super Power feature adds classes based on the SPK key that you can see here. This
Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power
is the SPK for theArrayHelper
class.What I can say, is that I've upgraded an existing installation of JCB version 2.13 directly to version 3.1. And that I was trying to recompile an existing component which was compiling in version 2.13 in this new JCB, targetting Joomla 4. Maybe I've missed some steps in the upgrade?