error when trying to view fields in admin view #967
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#967
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?
When I am using component builder everything works fine until I try to edit the fields from the admin view.
Reproduce:
Admin view
Fields
Edit (to add more fields)
I get
An error has occurred.
0 Argument 1 passed to VDM\Joomla\Utilities\GetHelper::between() must be of the type string, null given, called
Expected it to show fields to edit.
Joomla latest version
PHP 7.4
Firefox
Thanks
Do you mean Latest Joomla 3.10 version?
Area you using JCB v3.1.12?
Hi
I'm using JCB 3.1.12 and Joomla 3.10.11
thanks
Alan
From what I am seeing it is possible that this error comes because you have fields that are not having properties set. Since with the new search function I looked over all the places where we use this function:
GetHelper::between()
, you will have to search forHelper::getBetween(
as we are pulling the function via the helper class at this point. This will change going forward.But okay in my search for this string, in the admin view I found only 8 places its used:
Since your speaking about the admin view, that is ID:14, which means there are only two places this can go wrong:
Here we are getting the field select options, if the field is a list field.
This is used to get the all the places the view is linked to.
Both of these will only respond with that error because a field in your system does not have properties set.
How this happened I don't know. How to find this would be to open PHPmyAdmin and search over this table.
Should you not find it this way... you may need to manually go over the table looking at the xml column and see if you find something strange.
Thanks for the detailed reply :)
I've looked in the table and all the xml values are filled in.
Is it possible for me to adjust the code to get it to tell me where the problem is? Could I add something to checkArray($_fields) to get a list of the problems.
Argument 1 passed to VDM\Joomla\Utilities\GetHelper::between() must be of the type string, null given, called in /mnt/storage/vhosts/firstsight1.com/httpdocs/libraries/jcb_powers/VDM.Joomla/src/Utilities.php on line 397
I put some debug code into Component builder protected function getLinkedTo($view, $id, $guid)
but it looks like it's not reaching this point.
Can you tell me the order things get called once you clikc edit-> in the admin fields view and I'll try to trace it that way - or any other suggestions.
thanks
Alan
Hi
I've adjusted
/httpdocs/libraries/jcb_powers/VDM.Joomla/src/Utilities.php
Line 397:
I added the if statement to the function
This now allows editing but the formatting is a bit of a mess.
So it seems that whatever is passing $content isn't passing it correctly.
Alan
Well I showed you the only places this is done, and if you can not debug it around those areas I can't really help, since I have never had this issue. The rule of debugging is the ability to reproduce the issue, and that is why I pointed you to the right places in the code, as I am unable to reproduce this issue on my side.
You should know I have 10+ different JCB instance running with many different projects and I don't get see this bug. What is true is all my instances run in a dockerized environment, and on PHP 7.4 (critical at this point). I am planing to push out a release to move us to PHP 8+ soon... been working very hard to achieve this.
As we now have a beta (nightly-build) branch with all the latest fixes, I will direct you to it and consider this issue resolved. If you discover that the beta branch does not address the issue, please leave a comment here explaining what you found, and I will reopen this issue.
https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip