Strangest ever - Every entry shows 19 records

Status
Not open for further replies.
Hi there,

I had to backcheck several times and after confirming that this is indeed happening, I decided to post here.

I am using Fabrik 3.0 on J2.5.6 with the latest github release a few minutes ago with all of them showing version 3.0.6.

I have a form with rowid -1 and every time there is a record added it shows up 19 times. The same record - 19 times. I dont know why 19 times. Not 20 not 18, not anything else but 19. I deleted the entire contents of the table in PHPMyAdmin but no go. its still the same. To be clear - the datbase table shows only 1 (one) entry. Its Fabrik that shows 19 of them - all duplicates.

Also, try as I might prefilter just does not work. Even though I have rowid-1, and prefilter set to userid, {$my->id}, text and admin, everyone can see everyone's records.

Also, is it the standard thing is Fabrik 3 that I would have to add Admin and Super user groups in "Viewing Access Levels" in joomla for it to show up in the prefilter? The default were only Public, Registered and Special.

Could anyone shed some light on this strange issue?

Thanks.

Deepak
 
Is there a join in your table?

If you have a join in your table and you have turn on your view modus to each row it can cause things like this. I had it also in the past. Please check this.

Regarding your access levels, I can suggest that it is good invested time to read the joomla documentation and try different access groups and levels step by step to understand how that feature works. From my point of view, this is not a fabrik issue.


regards

jnskat
 
To the easy part: access levels
Prefilter ... is done (applied to) access levels (the default ones coming with Joomla are Public, Registered, Special), not groups (e.g. admin, superadmin); fabrik is just taking the Joomla2.5 ACL (which has changed a lot from Joomla1.5)

The records:???
can you enable fabrikdebug, do you have a link to your list?

Rowid -1 has nothing to do with the list view (with or without prefilter).
What are the settings of
your form menu item?
your userid element?
your prefilter?
 
Thanks for your help, Troester.

The others -

"To the easy part: access levels
Prefilter ... is done (applied to) access levels (the default ones coming with Joomla are Public, Registered, Special), not groups (e.g. admin, superadmin); fabrik is just taking the Joomla2.5 ACL (which has changed a lot from Joomla1.5)"

So if I want to have only admin see the list in the back-end and each user only views what records he has created then what do I do in Fabrik 3? In fabrik 2 access was admin which meant admin could see everyone's records.

"can you enable fabrikdebug,"

How do I enable it?
 
So can you enable fabrikdebug (in fabrik options)?

And check as jnskts said the join settings in your list: there may be a fabrik added join (e.g. a repeatable group ...); you'll have to set display mode = merge records or merge and reduce data
 
Yup.
Did you check the list joins (you seem to have a (hidden) repeated group.

Prefilter:
add 2 prefilters
userid={$my->id} apply to public
OR
id > 0 apply to special (so admins can see all records)
 
Did you check the list joins?
Your servicetype database join element has exactly 19 entries.
 
Ah---so it must be that guy doing something. Thank you for pointing that out, Troester. But it still does not explain why is this showing up 19 times. There are no repeated groups. This database join element is for a cascading drop-down.
 
Troester,

I noticed you have helped some users with prefilters. Isnt there any wiki entry for Fabrik 3 for prefilters?

Could you please tell me exactly how to set up the prefilters? because I still have not got it right. Because it throws up an error right now - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (( `j25_users`.`id` = '0' ))' at line 30 SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT

Thanks.

Deepak
 
Troester,

Thank you for pointing out the way. In List->Joins->Display Mode there are 3 options.
1. Display each row separately
2. Merge Rows
3. Merge Rows and Reduce Data.

I chose the 3rd option and this began working correctly. This does not show 19 records but only 1. Then I chose the 2nd option. Even that works correectly.

But I wonder, is this what this function is supposed to do?

Deepak
 
Got it working, Troester. Because of what you said. I just could not figure it out earlier. You said to do this -

Prefilter:
add 2 prefilters
userid={$my->id} apply to public (this works if I select registered as well)
OR
id > 0 apply to special (so admins can see all records)

What I could not understand earlier is how ID (i did not use userid) being greater than 0 applies to super users or admins. The id for admin is 62 or somethign like that. That is greater than 0 and admins are a member of the special group. So both conditions are necessary I hope I am right. It works though.

I have kept the thread open in case someone wants to explain this better than I can. Because I still have a few questions in mind. Managers and Authors also belong to the Special Group. They cant login to the back-end. But can they view the list?

With this doubt in mind, I changed the Special to Admin and checked to see if Super User could view list records. Super user could not. I created another admin and kept him admin only, not super user. This admin could see all the list data. So far, so good. Then with the OR option, I created one more prefilter for super user with the same parameters as admin. So now, I had 3 filters - registered, admin and super user. I logged in through 3 browsers for all 3 and checked whether each one was doing what the filter said they should do. Yes, they were.

I will still keep the thread open if in case others wish to contribute and share thier knowledge about this. As far as I know, the wiki does not have any entry for fabrik 3 prefilters and I hope this thread could help others like me.

Thanks.

Deepak
 
I don't think this issue is over for me. I was busy handling other aspects of this website and I didn't notice this particular issue.

In the form that has the pre-filter form data entered by a visitor (not logged in) is not cleared after the from has been submitted. This data shows to the next visitor. If in my prefilter I use userid={$my->id} apply to public then form data is cleared. However, this shows up -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (( `j25_users`.`id` = '0' ))' at line 37 SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT `book_a_concierge`.`id` AS `book_a_concierge___id`, `book_a_concierge`.`id` AS `book_a_concierge___id_raw`, `book_a_concierge`.`date_time` AS `book_a_concierge___date_time`, `book_a_concierge`.`date_time` AS `book_a_concierge___date_time_raw`, `book_a_concierge`.`name` AS `book_a_concierge___name`, `book_a_concierge`.`name` AS `book_a_concierge___name_raw`, `book_a_concierge`.`address` AS `book_a_concierge___address`, `book_a_concierge`.`address` AS `book_a_concierge___address_raw`, `book_a_concierge`.`mobile` AS `book_a_concierge___mobile`, `book_a_concierge`.`mobile` AS `book_a_concierge___mobile_raw`, `book_a_concierge`.`email` AS `book_a_concierge___email`, `book_a_concierge`.`email` AS `book_a_concierge___email_raw`, `book_a_concierge`.`servicetypes` AS `book_a_concierge___servicetypes_raw`, `servicetype`.`servicetypes` AS `book_a_concierge___servicetypes`, `book_a_concierge`.`services` AS `book_a_concierge___services_raw`, `services`.`service_name` AS `book_a_concierge___services`, `book_a_concierge`.`query` AS `book_a_concierge___query`, `book_a_concierge`.`query` AS `book_a_concierge___query_raw`, `book_a_concierge`.`userid` AS `book_a_concierge___userid_raw`, `j25_users`.`id` AS `book_a_concierge___userid`, `book_a_concierge`.`last_update_by` AS `book_a_concierge___last_update_by_raw`, `j25_users_0`.`name` AS `book_a_concierge___last_update_by`, `book_a_concierge`.`action_taken` AS `book_a_concierge___action_taken`, `book_a_concierge`.`action_taken` AS `book_a_concierge___action_taken_raw`, `book_a_concierge`.`updated_by_admin` AS `book_a_concierge___updated_by_admin_raw`, `j25_users_1`.`name` AS `book_a_concierge___updated_by_admin`, `book_a_concierge`.`ticket_status` AS `book_a_concierge___ticket_status`, `book_a_concierge`.`ticket_status` AS `book_a_concierge___ticket_status_raw`, `book_a_concierge`.`id` AS slug , `book_a_concierge`.`id` AS `__pk_val` FROM `book_a_concierge` LEFT JOIN `servicetype` AS `servicetype` ON `servicetype`.`servicetypes` = `book_a_concierge`.`servicetypes` LEFT JOIN `services` AS `services` ON `services`.`service_name` = `book_a_concierge`.`services` LEFT JOIN `j25_users` AS `j25_users` ON `j25_users`.`id` = `book_a_concierge`.`userid` LEFT JOIN `j25_users` AS `j25_users_0` ON `j25_users_0`.`id` = `book_a_concierge`.`last_update_by` LEFT JOIN `j25_users` AS `j25_users_1` ON `j25_users_1`.`id` = `book_a_concierge`.`updated_by_admin` WHERE ( `book_a_concierge`.`userid` = '0')WHERE (( `j25_users`.`id` = '0' ))

If I use Apply to "Registered" then this error disappears but evry visitor sees the data entered by the previous visitor. Quite a catch-22, isnt it?

Troester, any help please? The form is here - http://alaconcierge.com/index.php?option=com_fabrik&view=form&formid=3&Itemid=27

Deepak
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top