Error when compiling with module that has a custom get #1133
Loading…
x
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
Compile a component with module, that has a cutom get (getCustom(s)). The compiler throws an error
Expected result
component and module are build
Actual result
compiler exits with error Call to a member function get() on null
libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Joomlamodule/Data.php:449
I tried it with dynamic gets of type getCustoms and getCustom both render the same result, but when I remove the dynamic get from my module, everything compiles fine.
I had set up my module as explained in the video here https://www.youtube.com/watch?v=lriWW3Uzyc8 and everything was fine, but after I updated JCB (skipped many versions) it stopped working. Did I miss any changes on how this must be done?
As a workaround I guess, I can just query the database somewhere in my module helper or somewhere elese, but I think, this wouldn't be the way it's intended
System information (as much as possible)
Additional comments
Just wondering if you got a solution to this? I've got the same issue at the moment. JCB v3.1.28
Nope, unfortunately this still doesn't work and never got any help for this issue. Even upgraded my JCB to Joomla 5 but this is still broken. Either our question is too stupid to be answered or just no one cares...
I removed the custom get and moved my database query to the helper
OK. Thanks for the reply. Have gone the same way and got a working module. I'm sticking with 3.1.28 and Joomla 3.x.x at the moment as I know it does what I want and one of my components is a very complex mix which I can't risk breaking. Even PHP 8.2 is a step too far…
I’m sorry to hear that this issue has been persisting and that upgrading hasn’t made a difference. JCB is a very large and flexible tool, and sometimes certain features—like dynamic gets in modules—don’t see widespread use, which makes pinpointing these issues more challenging.
To help move this forward, could anyone who’s experienced this provide more specific details on what they’ve found so far?
Any concrete steps, error logs, or code snippets that you can share would make it much easier to track down the root cause. Once we have some focused details, we can start looking more closely at the relevant code paths and hopefully get a fix or at least a reliable workaround. I’m committed to seeing this resolved and appreciate any insights you can provide.
Thanks, Llewellyn, for looking at this. And, of course, all the effort and time you put into JCB. I'm running a similar system to kommid - Linux/CentOS, Apache 2.4, Joomla 3.10.12, PHP 8.0.30, MySQL 8.0.40
I've just added both a Custom Get and a Custom Gets and the trace is attached.
As mentioned in my post, I've got a work around so, to me, it's not a high priority. Unfortunately, at this level, understanding the code is way beyond my abilities. Thanks again - your commitment is appreciated.