Error Adding New Field to Admin View - Update MySQL Not Generated #1015
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1015
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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
I haven't worked out how to reproduce it with the Demo component yet. I'm sharing at this point because you may have some intuition on how to narrow it down.
In my existing project, I create a new field and add it to my admin view. Then, I compile.
Expected result
JCB generates all of the boilerplate for the new field, including the update MySQL.
Actual result
The first time a compile is attempted, it outputs the following error:
Cannot access protected property VDM\Joomla\Componentbuilder\Compiler\Builder\UpdateMysql::$active
The second time a compile is attempted, it compiles successfully, but the update MySQL is not generated. The install MySQL IS generated.
This is inconsistent. Some new fields do generate the update MySQL, others fail. Additionally, I only ever get the error once for any given field. In other words, once a new field has resulted in an error, it will never generate update MySQL and will never again give the error. It's making it a bit hard to debug, but I'll keep trying!
System information
I have fixed this issue in please try the beta-version: https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip
Also note that Joomla 3 does not work well on PHP 8.1+ you should use PHP 8.0 (only)
Thanks @Llewellyn, that fix worked!
And okay I will look into downgrading, thanks.