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

Query Prefilter working inconsistantely

chris.paschen

Chris Paschen
I've got a rather unique configuration (although I would think common for anyone pushing Fabrik just a bit).

3 Tables related to location and events at those locations (along with a contact person link to a table of people)

* locations (primary data source in the table)
* classes (join)
* courses (join)

They are joined together in the table joins area on locations.id->classes.location and classes.course->courses.id.

I've created a custom view in /com_fabrik/views/list/tmpl/bootstrap_CIYMS_classes.master (copied from the bootstrap view and modified for layout).

There is a field in the classes table "published". I need to display all the data for classes that are published.

I have a prefilter:
WHERE cmd_ciyms_classes.Published EQUALS 1 NO QUOTES Public

However, that doesn't appear to have any effect.

HOWEVER, if I add this to the pre-filter:
AND id EQUALS 26 NO QUOTES Public
(where id is from the locations table and 26 is the id of one of the locations that presently has a published class)
The display works properly (although obviously only showing the classes for location 26).

I've tried changing that to
AND id GREATER THAN OR EQUAL TO 1 NO QUOTES Public
But then it starts showing all the unpublished classes again - effectively ignoring the other pre-filter.

You can see the page here:
https://www.cmdnet.org/index.php?option=com_fabrik&view=list&listid=49&fabrikdebug=1
(this is presently using the GREATER THAN OR EQUAL TO 1 filter in addition to the 'published' filter)

I thought that maybe somehow the Fabrik List got messed up, so I created a completely new list with the same links and elements, and got almost identical results:
https://www.cmdnet.org/index.php?option=com_fabrik&view=list&listid=110&fabrikdebug=1
(although the published field is now displaying X and check instead of 0 and 1)

I temporarily added the "Available:" area just to allow easy the status of the related entries in the display.

Can you tell where this is going wrong, and why it works properly if I select a specific location, but not if I try to select multiple locations?
 
I'll need to play with the pre-filters. Can you add this site to your My Sites, with a backend login? I don't need ftp or mysql.

-- hugh
 
OK ... found the My Sites update page and added the site info (cmdnet).

Site is backed up.

The list with the issue is either:

The menu that displays these are under the main menu | Youth Ministry:
 
It's extremely hard to work on this without access to the database to test queries with. Can you open up for MySQL from 75.76.45.238?

-- hugh
 
I've added the appropriate info to the MySites for MySQL.
These settings are tested with MySQL Workbench and should work for others.
 
Access denied for xxxxxxx@myip. Which means I'm getting through to MySQL on 3306, but MySQL doesn't like me.

Did you add my IP to the grant?

-- hugh
 
Everything looks good from the server site - we see that you have tried to connect and were refused.
Can you make sure that SSL is NOT enabled.
(There is no block on any IP address at this time)
 
Also, web techs noted that you must be using "native" password authentication.
They also confirmed that your IP address is NOT blocked.
 
Yeah, I got in eventually. I think I'd managed to paste the wrong password into Navicat.

I think I've tracked it down and fixed it. It's one of those really (really) corner case issues, which seems to happen if you have more than two list joins, and a join element that involves the same table PK/FK as a list join, and be pre-filtering on that exact join, and are doing "merge rows" for the repeats. At which point it leaves out the WHERE join.pk IN(...) for that join. Or something along those lines.

Anyway, I set up a test here mimicking your setup, refactored some of the guts of the join code, and it's working here.

But ... as this seems to be a live site, I don't want to upload the fix. Let me know if it's not a live site. If it is, I'd suggest cloning it with Akeeba, and we try the fix on a clone. My main worry is side effects on other join setups.

-- hugh
 
This is a rather complex site that is a bear to replicate (in a live environment - i.e. anything other than local desktop).
I'll try to work on that and let you know IF I can get the replica made and available.
 
If you want, I can make a branch of current github and apply the changes to that, then you can try out the changes live and see if there's any side effects - if so you can roll back quickly, as it's only one file. The changes are to the very deepest and gory guts of the list model join code, so I'm always nervous about making changes. I *think* these changes will be OK, but ...

-- hugh
 
If it's just changes to one file, can you send just that file. Then I can test just those changes against the current branch on the live site (I can pretty easily backup and rollback the server if there are problems). That would also allow a live/real-world test of the change as well, and before anyone else were to download the branch and possibly run into a problem.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top