[BUG]: Compiler view Error when there are no Components created #1164

Open
opened 2024-08-19 09:52:39 +00:00 by Oh · 1 comment

What Happened?

Trash or Archive all Components in JCB and try to go to the Compiler, you get and Error: Call to a member function renderFieldset() on null

Steps to reproduce the Bug

  1. Trash or Archive all Components in JCB and try to go to the Compiler

  2. Presented with the following Error:

Screenshot from 2024-08-19 11-41-15

Which Joomla version are you compiling in?

v5.1.2

Which PHP version are you compiling in?

v8.2.18

Which Joomla versions are you targeting?

v5.1.2

Which PHP version are you targeting?

v8.2.18

Which Web server is JCB running on?

Apache/2.4.59 (Debian)

Which Relational Database is JCB running on?

MariaDB 11.3.2

Which OS is JCB running on?

Ubuntu Desktop (24.04)

Which JCB version are you using?

v 5.0.2

Where in JCB did this issue occur?

Compiler(admin_view)

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? Trash or Archive all Components in JCB and try to go to the Compiler, you get and Error: `Call to a member function renderFieldset() on null` ### Steps to reproduce the Bug 1. Trash or Archive all Components in JCB and try to go to the Compiler 2. Presented with the following Error: ![Screenshot from 2024-08-19 11-41-15](/attachments/7f84e924-2c2f-40f6-8089-e753c9dcd0e2) ### Which Joomla version are you compiling in? v5.1.2 ### Which PHP version are you compiling in? v8.2.18 ### Which Joomla versions are you targeting? v5.1.2 ### Which PHP version are you targeting? v8.2.18 ### Which Web server is JCB running on? Apache/2.4.59 (Debian) ### Which Relational Database is JCB running on? MariaDB 11.3.2 ### Which OS is JCB running on? Ubuntu Desktop (24.04) ### Which JCB version are you using? v 5.0.2 ### Where in JCB did this issue occur? Compiler(admin_view) ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
Oh added the
Bug
label 2024-08-19 09:52:39 +00:00
Owner

Can you do some tests on this? there are two places we should debug this:

The Class area:

On line 103 check what is the value received from getDynamicForm

We can also check what is the value from the model at line 100 when it calls the getComponents method in the model.

The view:

Here in the view where the error is found, we are calling the form value which I would expect to be null, if there are no components found, let me know what you see there.

Can you do some tests on this? there are two places we should debug this: **The Class area:** On [line 103](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/src/View/Compiler/HtmlView.php#L103) check what is the value received from [getDynamicForm](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/src/View/Compiler/HtmlView.php#L174) We can also check what is the value from the model at [line 100](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/src/View/Compiler/HtmlView.php#L174) when it calls the [getComponents](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/src/Model/CompilerModel.php#L451) method in the model. **The view:** Here in the view where the error is found, we are calling the [form](https://git.vdm.dev/joomla/Component-Builder/src/commit/2fab51f611ca004245a8c96ec249e5e587c9c3c5/admin/tmpl/compiler/default.php#L153) value which I would expect to be null, if there are no components found, let me know what you see there.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#1164
No description provided.