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
### 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_
Polmock
added the Bug label 2024-05-02 15:28:29 +00:00
Hmm this one seems strange since the ArrayHelper is loaded via the SUPER power implementation. Which means it should add the use 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 the ArrayHelper class.
Hmm this one seems strange since the `ArrayHelper` is loaded via the SUPER power implementation. Which means it should add the `use` statement automatically.
Which it is doing in all my extensions (to name a few):
- https://git.vdm.dev/getBible/joomla-component/src/branch/5.x/admin/tmpl/getbible/default_vdm.php#L19
- https://git.vdm.dev/getBible/joomla-component/src/branch/5.x/admin/tmpl/getbible/default_vdm.php#L19
- https://git.vdm.dev/getBible/joomla-component/src/branch/3.x/admin/views/getbible/tmpl/default_vdm.php#L22
- https://git.vdm.dev/joomla/Component-Builder/src/branch/5.x/admin/tmpl/componentbuilder/default_vdm.php#L13
- https://git.vdm.dev/joomla/Component-Builder/src/branch/4.x/admin/tmpl/componentbuilder/default_vdm.php#L13
- https://git.vdm.dev/joomla/Component-Builder/src/branch/3.x/admin/views/componentbuilder/tmpl/default_vdm.php#L16
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](https://git.vdm.dev/joomla/Component-Builder/src/commit/a24b5a0757e3bf30889c312c057147c776ea4434/admin/compiler/joomla_4/default_vdm.php#L33). This `Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power` is the SPK for the `ArrayHelper` 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?
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?
We have reviewed the Super Power integration and confirmed that the current JCB compiler correctly resolves the ArrayHelper Super Power and generates the required namespace imports.
Since this was reported against an older JCB version following a legacy upgrade, and the issue is not evident in the current generated code, we will be closing it.
We have reviewed the Super Power integration and confirmed that the current JCB compiler correctly resolves the ArrayHelper Super Power and generates the required namespace imports.
Since this was reported against an older JCB version following a legacy upgrade, and the issue is not evident in the current generated code, we will be closing it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
ArrayHelperis loaded via the SUPER power implementation. Which means it should add theusestatement 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
usestatement 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___Poweris the SPK for theArrayHelperclass.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?
We have reviewed the Super Power integration and confirmed that the current JCB compiler correctly resolves the ArrayHelper Super Power and generates the required namespace imports.
Since this was reported against an older JCB version following a legacy upgrade, and the issue is not evident in the current generated code, we will be closing it.