2 Class Headers not being added #957

Closed
opened 2022-09-02 17:49:05 +00:00 by Chris Paschen · 7 comments
Member

Steps to reproduce the issue

Add class headers to an admin view

Expected result

All headers added

Actual result

Headers not added for:

  • Target Site Admin View Model Header
  • Target Site Admin View Default Template Header

System information (as much as possible)

  • OS Name & Version: WAMP
  • MySql Version: 5.7.31
  • Apache Version: 2.4.46
  • PHP Version: 7.4.9
  • Joomla Version: 3.10.10
  • JCB Version: 3.1.2
  • Browser: Firefix Dev

Additional comments

I was initially tring to add something to the header for the site model, but it didn't work. So I've tested by adding comments in each of the various class header options, then compiling, and then doing a full search across the entire Joomla files.

The headers added for Site Admi View Model Header and Site Admin View Default Template did not get added.

All other headers were added properly.

Are there settings (or a plugin) somewhere that specifically controls the individual header types that maybe I set-up wrong?
This is my first attempt to use the headers so I may be missing something obvious.

### Steps to reproduce the issue Add class headers to an admin view ### Expected result All headers added ### Actual result Headers not added for: * Target Site Admin View Model Header * Target Site Admin View Default Template Header ### System information (as much as possible) - OS Name & Version: WAMP - MySql Version: 5.7.31 - Apache Version: 2.4.46 - PHP Version: 7.4.9 - Joomla Version: 3.10.10 - JCB Version: 3.1.2 - Browser: Firefix Dev ### Additional comments I was initially tring to add something to the header for the site model, but it didn't work. So I've tested by adding comments in each of the various class header options, then compiling, and then doing a full search across the entire Joomla files. The headers added for Site Admi View Model Header and Site Admin View Default Template did not get added. All other headers were added properly. Are there settings (or a plugin) somewhere that specifically controls the individual header types that maybe I set-up wrong? This is my first attempt to use the headers so I may be missing something obvious.
Author
Member

BTW .. I went through and tested each item and created a list for myself as to which specific files were effected (where the header was added) - mainly because I think in terms of the file structure and names and the titles on the Admin View / Class Headers tab just weren't quite making it clear to me.
Maybe this will help others getting started with adding Class Headers.

Target Admin View Model Header - /administrator/components/COM_COMPONENT/models/VIEW.php
Target Admin View Class Header - /administrator/components/COM_COMPONENT/views/VIEW/view.html.php
Target Admin View Default Template Header - /administrator/components/COM_COMPONENT/views/VIEW/tmpl/edit.php
Target Admin View Controller Header - /administrator/components/COM_COMPONENT/controller/VIEW.php
Target Admin Views Model Header - /administrator/components/COM_COMPONENT/models/VIEW.php
Target Admin Views Class Header - /administrator/components/COM_COMPONENT/views/VIEW/view.html.php
Target Admin Views Default Template Header - administrator/components/COM_COMPONENT/views/VIEW/tmpl/default.php
Target Admin Views Controller Header - administrator/components/COM_COMPONENT/controllers/VIEW.php
Target Site Admin View Model Header - NOT BEING ADDED
Target Site Admin View Class Header - components/COM_COMONENT/views/VIEW/view.html.php
Target Site Admin View Default Template Header - NOT BEING ADDED
Target Ajax Model Class Header - administrator/components/COM_COMPONENT/models/ajax.php

BTW .. I went through and tested each item and created a list for myself as to which specific files were effected (where the header was added) - mainly because I think in terms of the file structure and names and the titles on the Admin View / Class Headers tab just weren't quite making it clear to me. Maybe this will help others getting started with adding Class Headers. Target Admin View Model Header - /administrator/components/COM_COMPONENT/models/VIEW.php Target Admin View Class Header - /administrator/components/COM_COMPONENT/views/VIEW/view.html.php Target Admin View Default Template Header - /administrator/components/COM_COMPONENT/views/VIEW/tmpl/edit.php Target Admin View Controller Header - /administrator/components/COM_COMPONENT/controller/VIEW.php Target Admin Views Model Header - /administrator/components/COM_COMPONENT/models/VIEW.php Target Admin Views Class Header - /administrator/components/COM_COMPONENT/views/VIEW/view.html.php Target Admin Views Default Template Header - administrator/components/COM_COMPONENT/views/VIEW/tmpl/default.php Target Admin Views Controller Header - administrator/components/COM_COMPONENT/controllers/VIEW.php Target Site Admin View Model Header - NOT BEING ADDED Target Site Admin View Class Header - components/COM_COMONENT/views/VIEW/view.html.php Target Site Admin View Default Template Header - NOT BEING ADDED Target Ajax Model Class Header - administrator/components/COM_COMPONENT/models/ajax.php
Member

Hey Chris,
recently i've made ticket #943 where i stumbled upon the same issue. I found the solution to be adding the missing items in the array of /plugins/extension/componentbuilderheaderscompiler/componentbuilderheaderscompiler.php in the $targets array. Have a read of that ticket to see some screenshots i made.

Hey Chris, recently i've made ticket #943 where i stumbled upon the same issue. I found the solution to be adding the missing items in the array of /plugins/extension/componentbuilderheaderscompiler/componentbuilderheaderscompiler.php in the $targets array. Have a read of that ticket to see some screenshots i made.
Owner

Yes, this was a bug that I also encountered with the refactoring and it has been fixed, and the staging branch has this fix already applied. So if you can test with the staging branch to confirm it resolved.

Yes, this was a bug that I also encountered with the refactoring and it has been fixed, and the staging branch has this fix already applied. So if you can test with the staging branch to confirm it resolved.
Member

I downloaded the staging branch from https://git.vdm.dev/joomla/pkg-component-builder and as of 3.1.8 this has not been fixed. Do i need to look somehwere else?

I downloaded the staging branch from https://git.vdm.dev/joomla/pkg-component-builder and as of 3.1.8 this has not been fixed. Do i need to look somehwere else?
Owner

That package does not have a staging branch, it only has master. What is important is to update all plugins found in the v3.1.8 package.

I found a few bugs in the actual plugin that links the areas into the compiler, so having fixed it in the compiler, it was still not working correctly in the plugin.

Then there are some quark I found that is not that obvious. When you link classes in a way that cause a recursion in the linker. Since then it will timeout and not load those classes.

Then there is also the targeting of the verious areas. I just last week (when I fixed the plugin) target an area, and could not get it to load. During this debugging session I found the issue in the plugin and basicly intensly investigated all logic involved... just to at the end discover I was targeting the wrong area. If this can happen to me... it can also happen to other.

So be on the lookout for these two issues, recursion, and wrong area targeting.

That package *does not have a staging* branch, it only has master. What is important is to update all plugins found in the [v3.1.8](https://git.vdm.dev/joomla/pkg-component-builder/archive/v3.1.8.zip) package. I found a few bugs in the actual plugin that links the areas into the compiler, so having fixed it in the compiler, it was still not working correctly in the plugin. Then there are some quark I found that is not that obvious. When you link classes in a way that cause a recursion in the linker. Since then it will timeout and not load those classes. Then there is also the targeting of the verious areas. I just last week (when I fixed the plugin) target an area, and could not get it to load. During this debugging session I found the issue in the plugin and basicly intensly investigated all logic involved... just to at the end discover I was targeting the wrong area. If this can happen to me... it can also happen to other. So be on the lookout for these two issues, recursion, and wrong area targeting.
Owner

I think I found another bug... and I have resolved it... will push out an update soon.

I think I found another bug... and I have resolved it... will push out an update soon.
Owner

I assume this has been fixed, and soon as our new search feature I finished I will push out this fix with the new releas.

I assume this has been fixed, and soon as our new search feature I finished I will push out this fix with the new releas.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#957
No description provided.