PHP to show detail view of form in Community Builder tab

Hmm, can't see any error on your site.
No matter if logged in or not I can display the details view.
 
Are you sure you are seeing the details view? Right now I have it set as {fabrik view=list id=6}, which does not cause an error (because I cannot continue other work with the error manifesting). So when I go to a user profile and click the Fabrik tab, I see a list of profiles, not detail for that user.
Screen Shot 2016-11-15 at 02.32.27.png


If I put in the suggested code: {fabrik view=details id=6 usekey=user_id rowid=[$my->id] resetfilters=1}
I get this:
Screen Shot 2016-11-15 at 02.34.05.png
 
With "Details view" I meant a click on the "eye" in list view.

It's working with {fabrik view=form id=6 usekey=user_id rowid=[$my->id]}.

No idea why "view=details" is not working on your site (it is on my test site).
Maybe "view=details" is triggering also something in one of your many other components...

BTW:
There's no record for user fabrikar (J!user id=530)
If you have multiple records for one user (e.g. user 540) which record do expect to see with view=details (or view=form)? With "usekey" it will show the first record.
If you want to show the records belonging to the user you could do (user is a param in the URL so you can use it to filter the list)
{fabrik view=list id=6 y2vfp_fab_host_profile___user_id_raw= resetfilters=1}
 
Last edited:
The only way I could resolve that "Serialization of closure" issue would be to get an Akeeba backup of your site, install it here, and set up a PHP Storm project so I can debug it line by line. That's not something we can usually do as part of a subscription, we have to charge a one-off fee for the time involved in setting that up.

In this case i'm prepared to give it a go as part of the sub, as I need to check on the CB plugin anyway, and I don't have a CB site to test it on.

I logged in to the backend, but you don't seem to have Akeeba Backup installed. Which I strongly recommend you do, as it's an invaluable tool, both for regular backups, and creating "sandbox" clones for testing new releases of J! and Fabrik in.

-- hugh
 
I appreciate your offer but I am now reluctant to depend on a plugin that seems to be relatively unsupported for what is one of the most important aspects of our site (it literally is what customers are paying for). So I am thinking of other, more stable approaches.

I have tested inserting Fabrik data into Joomla articles and modules using Fabrik shortcodes and it seems to work OK. And since Community Builder has options to allow us to insert Joomla articles and modules and other types of content into the User Profile framework, I tried inserting an article that was based on Fabrik shortcode article insertion.

I am able to display any kind of Joomla content in a Community Builder tab using loadposition or loadmodule syntax. For example, if I put any kind of Joomla article or module in {loadposition profile}, and then call that from within a Community Builder tab, it displays correctly. But if I put an article or module in that position that is based on Fabrik content, the result is simply {loadposition profile}.

Is this perhaps a context issue? Is there a place in Fabrik content/system plugins to specify additional contexts for it to work in and if there is, can I specify field.custom or field.layout contexts?
 
The only issue with it is that I haven't updated it for whatever changes CB have made. It remained unchanged, stable and working for about 6 years prior to that.

The way you are trying to do it now is essentially going a long way round the houses to achieve not quite the same thing. If you don't use the CB plugin, you won't have the ability to know which user's profile is being viewed.

For the content plugin question, you may need to set "Process Joomla Plugin" in the form / list settings, under Advanced.

-- hugh
 
I certainly agree that NOT using a Fabrik/Community Builder plugin is a long way around, filled with compromises and incomplete functionality. If you would like to take a look, I have installed Akeeba Backup and created a backup. Please see info for download link
 
Any further suggestions of how I can get the Fabrik/Community Builder plugin to show an individual detail view under a tab in the Community Builder profile? This is really the main reason I am using Fabrik and need very much to get it working!
 
Sorry about the delay, you posted about the backup the same day I had a death in the family that took me out of commission (combined with Thanks Giving) for most of last week.

I just looked at your site, and Akeeba is saying that backup is no longer available.

Is it OK for me to kick off another one?

-- hugh
 
Poop happens. My wifes's cousin, a real nice guy, father of two girls. He was only 39.

About to do the backup and download / install it.

How much longer will you be around to field any questions I have?

-- hugh
 
I'm installing it here now. Turns out your backup is over a gigabyte, took a while to download, and I got distracted by other stuff before it finished.

-- hugh
 
Meh.

AN ERROR OCCURED
The archive file is corrupt, truncated or archive parts are missing

Can you fill out FTP details in My Sites? Maybe downloading such a huge file over http was optimistic.

Also, should it be that big? Is there anything you can remove from the site folder?

-- hugh
 
I will set up an FTP login for you. In the mean time you could try downloading the backup that I did--it is still available at the link provided in my info tab. It is only 551.6 MB
 
For reference: there is a Community Builder tab called Fabrik. It can display lists and forms but results in error when I try to make it directly show details for the user associated with the Community Builder profile you are looking at. You can see the tab on the frontend if you are logged in and click the Account Info link under My Account. It is now set up to pull from list id 6. This table contains 3 records with unique id.
 
OK, found the problem. Well, two problems.

First is that we weren't recognizing [$my->id], it was still expecting {$my->id}, as that code predates when we cghanged to using [] instead of {} inside {fabrik ...} plugin strings, due to issues with the way J! parses those strings (embedding { ... {...} ...} breaks it). I'm adding some code in there so we recognize either usage.

But the problematic one, the "serialization of closure", is because of the way we build the $cacheId, when displaying the view. The $cacheId is created as ...

Code:
   $cacheId = serialize(array($uri, $input->post, $user->get('id'), get_class($view), 'display', $this->cacheId));

... which produces a unique string for this view, which tells us if we can use the cached content, or need to rerun the display. And it seems that when loading the CB page, the $input->post now includes some J! objects (inserted by the CB page handling), which indeed are "closures" and cannot be serialized.

I'm reluctant to change that, as we need the POST data in there to control normal handling of Fabrik display caching.

I think what I'll need to do is add a session variable in the CB plugin, something like fabrik.plugin.nocache, and test that in the main form display code.

Once I've sorted that out, I'll take a look at that "is not compatible with your CB version" thing.

-- hugh
 
This "This plugin is not compatible with your current CB version. This plugin may still be used, but it may not function properly." is only because of the version number in \components\com_comprofiler\plugin\user\plug_fabrik\fbk.fabrik.xml
If you change <version>1.2</version> to something with 2.x the warning is gone
(I didn't manage to have it to show the version but it has two green checkmarks;))
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top