• 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.

List - Layout - Tabs

arie

Member
This feature isn't working as expected:
  1. the dropdown element Tab element does not populate all the table fields but only elements that are a field plugin (i guess)
  2. due to the issue below, if I can oly select a field (which is as int => FK), I cannot get the value frtm another table though a dbjoin and thus, cann'ot use the sql where option being applied to the dbjoin
Any advise?
 
Can you provide the URL and list information that you are using? I'm not sure what you mean by the initial question at all I'm afraid.
 
1/Have a look on the first image (Capture list.png), you will see that we have only the choice to select one of the 5 fields while that list has 14 fields (Capture fields.png). The 5 fields displayed are both fields plugin.
2/Now, the field I want to be the tabs field (#218 association_id => dbjoin) isn't displayed in that dropdown so I need to transform it to a regular field plugin -> from dbjoin to field => done (Capture list2.png).
Now, if I select that field (#218) as the tbas field, you will see (Capture list3.png) that:
- the tabs labels of that list display the id but I need a label (frrm a dbjoin)
- ans as I cannot filter because it is not a dbjoin, i have a long list if ids rather to have only few.

Hope my explantion is better
 

Attachments

  • Capture list.png
    Capture list.png
    98.3 KB · Views: 293
  • Capture fields.png
    Capture fields.png
    127.5 KB · Views: 282
  • Capture list2.png
    Capture list2.png
    94.7 KB · Views: 274
  • Capture list3.png
    Capture list3.png
    59 KB · Views: 278
That feature is "Work in Progress", contributed (iirc) by Sophist in a PR a while back, and is pretty much "it is what it is". We'll need to get him to fix it, if its fixable in this scenario. I'll ping him in our Skype session, see if he has any ideas.

However, I suspect there may not be a workable solution for this.

-- hugh
 
Yes - it was my contribution. The issue seems to be that I didn't make it handle elements with index / value like databasejoin. The solution should not be difficult - but I don't have the time at present to work out how to handle this situation from scratch. But if Rob or Hugh can give me a hint about how to handle these types of elements I will look at fixing this.
 
I'll have to find some time to work out how that code all hangs together. Although you did rather just invoke the Murray Walker Kiss of Death, by saying "the solution should not be difficult". Which means the Universe just subtly shifted, and made sure its going to be an SoB to fix. ;)

It'll take me a day or three to find the time to wrap my head round the code and work out what the issue is.

-- hugh
 
This is probably going to have to wait till Sophist has time to look in to it. It's his code, and the rule is, when you contribute a new feature, you are responsible for maintaining it for the rest of your natural life, and (if possible) beyond.

But I'm having another look now, see if I can work it out.

-- hugh
 
OK, I see where the code needs work ... basically the main query where it fetches the "tabs field" data:

Code:
$query->select(array($tabsField, 'Count(' . $tabsField . ') as count'))
->from($db->quoteName($table->db_table_name))
->group($tabsField)
->order($tabsField);

... obviously needs to be somewhat different if $tabsField is a join.

I've made a start on it.

-- hugh
 
Nope, and it's distinctly non-trivial to fix, as that code will now have to check all element types used in the tabs to see if they are a join, and then work out how to build the join to fetch the data from the joined table, which is obviously dependent on the configuration of the join element. And being code contributed by someone else, I wouldn't have written it that way to start with.

I really can't promise that this is fixable, as it's a seriously large chunk of code rewriting, for a corner case on a feature which very few people use.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top