Create admin view and select any class to be loaded in the Site Admin View
Model Header
Download compiled zip and look at the file site/models/#adminviewname#.php
Expected result
Expectations are that the class is loaded in the file
Actual result
The actual result is that it's not
Important note is selecting this same class in the admin view model does work
Looking at the compiled zip again in file admin/models/#adminviewname#.php shows it that the class loads correctly in the admin model.
System information (as much as possible)
OS Name & Version: Windows 10
MySql Version:
Apache Version:
PHP Version: 7.4
Joomla Version: 3.10.10
JCB Version: 3.1.4
Browser: Firefox
Additional comments
I've went down the rabbit hole of the compiler and looked at the plugin componentbuilderheaderscompiler but i did not understand the $targets var properly to fully debug it
### Steps to reproduce the issue
1) Create admin view and select any class to be loaded in the Site Admin View
Model Header

2) Download compiled zip and look at the file site/models/#adminviewname#.php
### Expected result
Expectations are that the class is loaded in the file

### Actual result
The actual result is that it's not

**Important** note is selecting this same class in the admin view model *does* work

Looking at the compiled zip again in file admin/models/#adminviewname#.php shows it that the class loads correctly in the admin model.

### System information (as much as possible)
- OS Name & Version: Windows 10
- MySql Version:
- Apache Version:
- PHP Version: 7.4
- Joomla Version: 3.10.10
- JCB Version: 3.1.4
- Browser: Firefox
### Additional comments
I've went down the rabbit hole of the compiler and looked at the plugin componentbuilderheaderscompiler but i did not understand the $targets var properly to fully debug it
The headers in the site view also has a plural and a singular option which is determind by the kind of mainGet method that is added to the site view.
So if you select a main getListQuery you should use the Target Site Views Model Header
And if you use a main getItem you should use the Target Site View Model Header
Have you made this destiction?
The headers in the site view also has a plural and a singular option which is determind by the kind of mainGet method that is added to the site view.
So if you select a main `getListQuery` you should use the `Target Site Views Model Header`

And if you use a main `getItem` you should use the `Target Site View Model Header`

Have you made this destiction?
I realise i did not mention this properly. My post is about the site edit view that is created when you select 'add+menu' in the admin views in your component. like this:
I'm not talking about site views that you create yourself in JCB
I realise i did not mention this properly. My post is about the site edit view that is created when you select 'add+menu' in the admin views in your component. like this:

I'm **not** talking about site views that you create yourself in JCB
Okay they also have their own header model called Target Site Admin View Model Header
Can you check that you have them also selected with the needed details? We build it like that so that you can target those header directly without also adding those classes to the admin area.
Okay they also have their own header model called `Target Site Admin View Model Header`

Can you check that you have them also selected with the needed details? We build it like that so that you can target those header directly without also adding those classes to the admin area.
Okay so in the e_Interpretation.php method setFileHeader on line 22533:
We have a switch that gets triggered on the target site.admin.view.model:
Add the data of that area is stored by the plugin site_admin_view_model field:
So a ran a quick search in the f_Infusion.php class and found the call to this target site.admin.view.model on line 660:
This seems all to line up... hmmm
I will do a manual test later and see if I can find the bug... this info is to show you where I normally look to make sure that all key/code words are correct.
Apoligies...
Okay so in the e_Interpretation.php method `setFileHeader` on line 22533:

We have a switch that gets triggered on the target `site.admin.view.model`:

Add the data of that area is stored by the plugin `site_admin_view_model` field:

So a ran a quick search in the f_Infusion.php class and found the call to this target `site.admin.view.model` on line 660:

This seems all to line up... hmmm
I will do a manual test later and see if I can find the bug... this info is to show you where I normally look to make sure that all key/code words are correct.
I may have cracked the code. I hijacked the process a bit and dumped some data out and came up with this:
In the 'componentbuilder headers compiler' plugin the var $this->activeHeaders is called but that does not contain the site.admin.view.model but does use all other selected fields.
Adding further to this i looked in the $targets var and saw that the site_admin_view_model was only defined in the site view headers. Meaning that the model for the site_admin_view never gets called no matter what you select in the admin view settings. Adding this to the file /plugins/extension/componentbuilderheaderscompiler/componentbuilderheaderscompiler.php:
Resolves the issue
I may have cracked the code. I hijacked the process a bit and dumped some data out and came up with this:

In the 'componentbuilder headers compiler' plugin the var `$this->activeHeaders` is called but that does **not** contain the site.admin.view.model but does use all other selected fields.
Adding further to this i looked in the `$targets` var and saw that the site_admin_view_model was only defined in the site view headers. Meaning that the model for the site_admin_view never gets called no matter what you select in the admin view settings. Adding this to the file `/plugins/extension/componentbuilderheaderscompiler/componentbuilderheaderscompiler.php`:

Resolves the issue

Just curious if there has been any progress on this as I'm running into the same issue?
I just installed the 3.1.12 tag of JCB and it doesn't look like anything has changed there yet.
Just curious if there has been any progress on this as I'm running into the same issue?
I just installed the 3.1.12 tag of JCB and it doesn't look like anything has changed there yet.
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.
Steps to reproduce the issue
Model Header
Expected result
Expectations are that the class is loaded in the file

Actual result
The actual result is that it's not

Important note is selecting this same class in the admin view model does work


Looking at the compiled zip again in file admin/models/#adminviewname#.php shows it that the class loads correctly in the admin model.
System information (as much as possible)
Additional comments
I've went down the rabbit hole of the compiler and looked at the plugin componentbuilderheaderscompiler but i did not understand the $targets var properly to fully debug it
The headers in the site view also has a plural and a singular option which is determind by the kind of mainGet method that is added to the site view.
So if you select a main
getListQueryyou should use theTarget Site Views Model HeaderAnd if you use a main
getItemyou should use theTarget Site View Model HeaderHave you made this destiction?
I realise i did not mention this properly. My post is about the site edit view that is created when you select 'add+menu' in the admin views in your component. like this:

I'm not talking about site views that you create yourself in JCB
Okay they also have their own header model called
Target Site Admin View Model HeaderCan you check that you have them also selected with the needed details? We build it like that so that you can target those header directly without also adding those classes to the admin area.
Yes the site admin view model header is selected

Apoligies...
Okay so in the e_Interpretation.php method
setFileHeaderon line 22533:We have a switch that gets triggered on the target
site.admin.view.model:Add the data of that area is stored by the plugin
site_admin_view_modelfield:So a ran a quick search in the f_Infusion.php class and found the call to this target
site.admin.view.modelon line 660:This seems all to line up... hmmm
I will do a manual test later and see if I can find the bug... this info is to show you where I normally look to make sure that all key/code words are correct.
I may have cracked the code. I hijacked the process a bit and dumped some data out and came up with this:
In the 'componentbuilder headers compiler' plugin the var
$this->activeHeadersis called but that does not contain the site.admin.view.model but does use all other selected fields.Adding further to this i looked in the


$targetsvar and saw that the site_admin_view_model was only defined in the site view headers. Meaning that the model for the site_admin_view never gets called no matter what you select in the admin view settings. Adding this to the file/plugins/extension/componentbuilderheaderscompiler/componentbuilderheaderscompiler.php:Resolves the issue
Just curious if there has been any progress on this as I'm running into the same issue?
I just installed the 3.1.12 tag of JCB and it doesn't look like anything has changed there yet.