Site view model not importing selected classes correctly #943
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#943
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?
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
getListQuery
you should use theTarget Site Views Model Header
And if you use a main
getItem
you should use theTarget 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
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.
Yes the site admin view model header is selected
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
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.