• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Calculation - Split on problem

dimoss

Well-Known Member
Hi

I tried to upgrade my J2.5 with F3.0.x to J3.x with F3.2. I followed the wiki instructions but I have some small problems. One of them is on the element calculations. Although it calculates correctly, it shows the value instead of the label! I deleted and made it again but I got the same result.

See attached image.
In the red arrow position it should show the label of the green arrow.

Screenshot_1.jpg

The same stands also with a project I have with J3.x nad F3.2

Thanks
 
Can you translate the bits with the arrows pointing at them, and tell me what they should be?

Also, what element type is that column? Does this happen with other element types?

-- hugh
 
Hi Hugh

The red arrow shows '???????' which is the dbjoin element label.
Instead it shows the dbjoin element value.
The column type is dbjoin and the calculation is split on the same element.
Thanks
 
Hi again

I checked with other element types (ex. field, calc) and works ok.
Is seems that the problem is on dbjoin. I guess with CDD also.

I checked also in the F3.2.x project with J3.2.x and the same problem exists with the latest Github.

Thanks
 
Apologies for slow response. I'm having another small surgical procedure today (cervical epidural) which will hopefully block the post-op neck / arm pain I've been having since my neck fusion a few weeks ago, which has been making it very difficult to work.

Bump this thread again tomorrow, or catch me on Skype. I think I know where the issue is in the code, but it would be useful to have you available for testing the fix, as it's a difficult one for me to replicate locally.
 
Did you try to put something into CONCAT?

I had a look at the code, the 3.2 is different from 3.0 (and I don't understand what it is doing;)), but CONCAT is handled extra, so maybe this is working better.
 
Yes, but maybe putting
{thistable}.labelcolumn
into CONCAT will help (I didn't try).
 
Friendly bump..

I just noticed that the same problem stands also for the user element. Instead of showing the name, it shows the id.
 
Maybe this thread should be called something else;)
I think I've found the place. In models/element.php line 5154 it's doing
Code:
            if ($plugin->hasSubElements)
            {
                $val->label = ($type == 'median') ? $plugin->getLabelForValue($val->label) : $plugin->getLabelForValue($key, $key);
i.e. only in case of median it's getting the label.

I have really no idea what median is/should be doing in case of split but if you change the logic to
$val->label = !($type == 'median') ? $plugin->getLabelForValue($val->label) : $plugin->getLabelForValue($key, $key);
at least the non-median calculations are fetching the label as expected.

Edit: ok for dbjoin, user, cdd elements.
link element is displaying a json string as label {"label":"rrrr","link":"http:\/\/rrr.ch"}
 
Hi Troester

Thanks a lot!
I confirm that it works now,
However I dont know if it is a permanent fix because if someone uses median maybe he has the same problem.
Thread title changed.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top