[BUG]: $this->styles and $this->scripts are null in site view #1122
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1122
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?
File: com_<component_name>/src/View/<single_view_name>/HtmlView.php, method '_prepareDocument'.
I get 2 warnings because
$this->styles
and$this->scripts
are null, so the foreach is supplied wrong elements.I do not understand if it's ok that they are null (and not simply empty arrays or something else). Anyway, wrapping the 2
foreach
with anif
statement each verifying that the 2 properties are not null, suppresses the warnings.Steps to reproduce the Bug
Compile a component with a site view and navigate an element.
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-rc5
Where in JCB did this issue occur?
Compilation of a component, Site View(admin_view)
On which browsers did you encounter the issue?
Firefox, Chrome
Additional Comments
No response
Can you reinstall JCB, and give me a snapshot of the model,view classes of this view?
The models have all been updated to now have these new values and it is hard-coded to the model, so it seems like your JCB is not using the new template files found in the compiler folder.
Check that your templates are up-to-date, since the compiler location can be overwritten:
So I am asking that you make sure you are using then newest latest templates in the compiler folder found here: https://git.vdm.dev/joomla/Component-Builder/src/branch/3.x/admin/compiler
There are major changes in both the Joomla 3 and Joomla 4 templates and some of the issues you've reported speaks of wrong template files being used.
So to manually check some of the files that they match what is in our repository would be needed. I have seen in the past that I install a component, and that it does not update the files (don't ask me why) but I have seen this.
No if the files are indeed in sync and the issue continues, then we need to see the files that was build.
Please only use Firefox to compile you components... never use Chrome.
I've updated to 3.2.1-rc6 version.
And manually replaced the compiler folder just to be sured that it's up to date.
I've downgraded php to 8.0.27 version (of course, I always use Firefox to compile).
But I have the same issue